keyevent
How to dynamically assig keys to buttons?
I have a section in my GUI that is generated dynamically according to a list of objects. So, for each object in that list I want to create a JButton and associate a keyboard shortcut.[详细]
2023-03-13 14:40 分类:问答KeyEvent special Keys (like mute)
I\'m currently trying to create a little remote-app for Android to control a MediaPlayer (like Rythmbox) on my PC.[详细]
2023-03-11 12:42 分类:问答Java: Handling ' - ' character in custom component text field
I have a custom text field that only accepts numbers in it. Everything works fine except when I try to handle the negative (-) sign.[详细]
2023-03-10 09:28 分类:问答Android: how to prevent foucs change while press navigation key?
For some special reason, I have to manage focus all by myself. In emulator, KeyEvent.KEYCODE_DPAD_DOWN and UP were assigned to move focus. To get things right, I prototyped like below[详细]
2023-03-08 10:21 分类:问答C# - System.Windows.Forms.Keys - How to keep application hotkeys in one place
I have few \"hotkeys\" in my application. All \"hotkeys\" sequences are unique in application scope (so for example F12 key will always fire the same single task). In few places there are handled like[详细]
2023-03-07 15:53 分类:问答Android: No KeyEvent on unfocusable view?
In my case, I\'m required to intercept all key events before they are dispatched to target.So I installed a KeyListener on every view or widget, Activity.onKey can\'t satisfy me in the case.[详细]
2023-03-07 13:12 分类:问答How do I capture Keys.F1 regardless of the focused control on a form?
I used KeyDown event and some simple code like if (e.KeyCode == Keys.F1) to capture F1 is pressed on a form BUT if there are some text boxes on the form or if there are some spreadsheets with Dock Fil[详细]
2023-03-05 07:35 分类:问答Detect Key in KeyUp event
I have a textbox on 开发者_StackOverflow社区a form where I\'m trying to detect the keys the user types in. The TextBox is multilined with wordwrap on. I don\'t want the user the press the enter key (a[详细]
2023-03-04 21:34 分类:问答Fake KeyEvent doesn't work *exactly* like "real" button. Why?
I am trying to invoke my main activity\'s onKeyDown() with KEYCODE_BACK, so that it behaves as if I pressed the \'back\' button myself. I do that using the following code:[详细]
2023-02-27 16:36 分类:问答JAVA - Creating a KeyPress Event During a Button Action Listener click event
I am creating a java Sudoku GUI application at the moment. The grid for showing the Sudoku puzzle is simply a 2 dimensional array of myJButtons(implementing JButton) - for this problem they can be tr[详细]
2023-02-25 17:34 分类:问答