keyboard-events

Is pressing Enter key on the keyboard not equivalent to a mouse click in Android?

Hi, The buttons in my layout are not getting pressed on Enter key. When I click on them using mouse, the code inside onClick() is getting executed. But when I press the Enter key, onClick() is not getting called. I know that for keys, I must be using onKeyListener instead. However, does onClick() not work for both mouse click and keybo...

Show keyboard with a UIPopover

How can I show the keyboard when my popover shows up? The popover is UIViewController that I call from a popoverController. The popover has an UITextField and when the popover is displayed, the keyboard need to show up too and the cursor go to the UITextfield. I tried to put the becomeFirstResponder under viewDidLoad or viewWillLoad,...

Why would my app not be able to "attach" an action?

I've changed my app class type from NSObject to NSApplication and now I get the following message when testing my app: Could not connect the action buttonClicked: to target of class NSApplication What does this mean and how can I fix it? ...

Keyboard events

How do I call a click event of the link, when some keyboard button is pressed? I would like to call a next/previous page on Ctrl + / Ctrl + ...

How can I capture CTRL-BACKSPACE in WPF/C#?

I have an application which uses PreviewKeyDown to capture CTRLX keystrokes (where X is any letter) along the lines of: Key key = (e.Key == Key.System ? e.SystemKey : e.Key); if (e.KeyboardDevice.Modifiers == ModifierKeys.Control) { switch (key) { case Key.A: keyStroke = 0x01; break; case Key.B: keyStroke = 0x02; bre...

Make WPF TextBox or other focusable controls transparent to certain key presses (i.e. pass-through, not swallow)

I have a ListBox with a custom data template which contains a CheckBox, a TextBlock and a TextBox. Normally when you select an item in a ListBox, the underlying ListBoxItem is actually what has the focus and as such, it responds to the up and down keys. Additionally, if the CheckBox has focus, since it doesn't do anything with the up a...

Prevent Enter Event from Bubbling to to Main Window

I have a custom Swing component called NavigationLink which extends JLabel and implements a key event listener like so: addKeyListener(new KeyAdapter() { public void keyReleased(KeyEvent e) { boolean actionInvoked = e.getKeyCode() == KeyEvent.VK_ENTER || e.getKeyCode() == KeyEvent.VK_SPACE; if (actionInvoked && Navig...

Flex Canvas keyboard event handling

In the attached code sample, keyboard events just don't work. The control never reaches handleKeyDown, no matter which key I press. <?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"> <mx:Canvas creationComplete="initIt()" id="can1"> <mx:Label text="it's here" y="2000"/> <...

my searchbar is working with done button how should it call the same method with search button of keybaord :iphone

hi all. In my application user input some text in searchbar and application genrate RSS feed agiant this text when done button is pressed. I want that the same action is performed when the user click on search button of keyboard. Any Idea. ...

How to find the key code for a specific key

What's the easiest way to find the keycode for a specific key press? Are there any good online tools that just capture any key event and show the code? I want to try and find the key codes for special keys on a mobile device with a web browser, so an online tool would be great. ...

Silverlight - Button control tab stop twice mystery

I'm debugging a large Silverlight application and i'm finding on every form all button controls receive tab focus twice before going to next control. I cannot reproduce this behavior in a simple hello world application though. Interestingly this problem does not occur on HyperlinkButton controls in the same form, just Button. Any idea wh...