keyboard

Locating the first WPF tab stop

别来无恙 提交于 2019-12-24 07:15:19
问题 Thanks to an answer on a previous question (Previous Question), I now have a body of code that navigates WPF tab stops (shown below). It works fine except for the first tab stop. Calling this.MoveFocus(...First) and followed by FocusManager.GetFocusedElement returns null. Any ideas? How do I get the first tab stop in my window? Thanks, - Mike // Select the first element in the window this.MoveFocus(new TraversalRequest(FocusNavigationDirection.First)); TraversalRequest next = new

Translate keyboard layout with python

◇◆丶佛笑我妖孽 提交于 2019-12-24 06:45:54
问题 I'm using a digispark arduino-compatible device to emulate a keyboard with an US layout (it uses DigiKeyboard.h as library to do so). Now,it just takes as input an integer which represent a key and sends it to the computer following the USB keyboard standards, everything fine until this point. The problem is that I need this device to work with every keyboard layout, my question is: is there a way to "translate" the numeric value representing a character to the numeric value which represent

Delphi FMX: How to reliably detect pressing of Return key on Android device?

戏子无情 提交于 2019-12-24 06:36:41
问题 given a Delphi 10.1 Berlin update 2 Firemonkey Android app and a TEdit. I like to detect when the user presses Enter while being in the TEdit. I implemented an OnTyping event already where I loop through all the chars of the .Text property. If vkLineFeed or vkReturn is detected it is Enter (I added the check for vkLineFeed by finding out that certain devices do send that one instead of vkReturn). ReturnKeyType is default. When being set to done or go it looks like I don't even get the Enter

How to trap global keydown/keyup events in cocoa

删除回忆录丶 提交于 2019-12-24 06:35:02
问题 I want to trap, modify and divert all the keydown/keyup events in the system within my cocoa app. I know about CGEventTapCreate but, didn't found any working code from net. Thanks 回答1: Found Solution: self.machPortRef = CGEventTapCreate(kCGSessionEventTap, kCGTailAppendEventTap, kCGEventTapOptionDefault, CGEventMaskBit(kCGEventKeyDown), (CGEventTapCallBack)eventTapFunction, self); if (self.machPortRef == NULL) { printf("CGEventTapCreate failed!\n"); } else { self.eventSrc =

Problem with handling keyboard events inside a Canvas using Flex

匆匆过客 提交于 2019-12-24 06:04:29
问题 For some reason, the event listener I define never seems to receive any events, although I believe it should. Here's a very short description of the MXML code I'm using: WindowedApplication VBox (root box) MenuBar TabNavigator VBox (first tab) Canvas VBox (second tab) If I add a listener for KEY_DOWN events to WindowedApplication or the root VBox, the handler receives the events just fine. But if I add the listener to the Canvas or the first tab VBox, the handler never seems to receive any.

Objective C: ResignFirstResponder with a button

我只是一个虾纸丫 提交于 2019-12-24 06:00:36
问题 Is there a way for a UIButton to trigger resignFirstResponder? I have my program set to do so in a function when you tap outside of a textfield, but I want the keyboard to go away when the user hits the submit button. This is what I have for the UITextFields - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { [x1 resignFirstResponder]; [x2 resignFirstResponder]; [y1 resignFirstResponder]; [y2 resignFirstResponder]; } 回答1: Given the existence of the method you mention, how about

How to detect Virtual Keyboard Events in Android with Delphi

落爺英雄遲暮 提交于 2019-12-24 05:38:09
问题 I'm trying to develop an Android app with Rad studio Xe5 with Delphi, and i having the following problem: There is a Tmemo, which is at the bottom of the screen, and at the time of pressing it for typing some text, the virtual keyboard is showed over the Tmemo which i can't see. I would like to detect the event on show keyboard and move change the position of that Tmemo. I will do the same when the Virtual Keyboard is hide, and bring back the Tmemo to his original position. Does anybody know

Xamly set keyboard focus to an element in DataGridTemplateColumn cell?

安稳与你 提交于 2019-12-24 04:52:11
问题 I've set stuff in a DataGridTemplateColumn.CellEditing DataTemplate. I want that when the cell editing loads and shows the template, keyboard-focus should be given to a certain control in the template. Consider this example, when you go edit mode, the textbox is not keyboard-focused: <Window x:Class="MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="MainWindow" Height="350" Width="525"> <Grid> <DataGrid

setting of the AWD keyboard

孤人 提交于 2019-12-24 04:24:09
问题 When I create an emulator in the AWD manager (I use 233 & api 10) on my computer that is setup for american english, it defaults to a Japanese IME keyboard (bad choice in my opinion). So when I try to run a simple textfield app such as... I get the foreign keyboard. How do I change it to U.S. english? If I go to settings in the emulator and select US english it has no effect. It just stays Japanese IME. Thanks, Dean 回答1: Long press a text input field (for example the one in Google Search)

iOS 8 Swift : How to keep the keyboard displayed when the UIAlercontroller is presented modally?

南笙酒味 提交于 2019-12-24 04:20:22
问题 The context is pretty simple, there is a UIViewcontroller with a textfield to enter a phone number. The textfield is in editing mode with keyboard. When the number is entered, the user can tap a button which displays an alert controller. As the alert is presented modally it covers the UIViewcontroller and removes keyboard, the editing is no more enabled. Thus my question, what should be done to keep the keyboard displayed behind the alert? 回答1: This solution worked let rootViewController: