keystroke « Event « Java Swing Q&A





1. How to activate java swing application by keystroke when it's in system tray    stackoverflow.com

I want to show the form when someone presses a key in my java swing application when it is in system tray. I have tried adding key listeners, but it didn't ...

2. KeyStroke    coderanch.com

3. Help me to understand this keystrokes!!    coderanch.com

Hello, Could you please help me to understand: 1. What does following means: menu.setMnemonic(KeyEvent.VK_F); Does it mean that it is setting Key "F" as hot key with the use of ALT key. Is this "ALT" is fix one? Can I you some other key like "SHIFT" etc. here. 2. I tried the following code it works very well with single key. ...

5. Control as a keystroke?!    coderanch.com

Is this really not possible?! I see how to get things like control and shift as modifiers, but what if I just want to know when the user hits control?! getInputMap().put( KeyStroke.getKeyStroke( KeyEvent.VK_SPACE , 0 ), "what a crock" ); getActionMap().put( "what a crock" , action ); works fine, but with KeyEvent.VK_CONTROL (or ("CONTROL" , 0)), nothing. [ June 19, 2008: ...

6. Remove Keystroke event for enter key    coderanch.com

Hi, I am trying to disable/remove the enter key keyEvent. I'm adding a logonPanel (not created by me) to a loginFrame which I created. In the logonPanel class, the submit button has a KeyListener which checks for enter key and eventually triggers an Actions interface method which I have overriden. For incorrect logins a JOptionPane window pops up and asks to ...

7. AbstractAction name with a associated KeyStroke    coderanch.com

I have implemented a action class, that extends the AbstractAction and also I have associated a KeyStroke with that action. So for example my OpenNewStuff action is triggered when Ctrl+O is pushed. My problem is, that I want that the "Ctrl+O" binding information would be reflected in the Actions's name parameter. Like for example in Firefox browser, when you push the ...

8. Override Java Component keystrokes    coderanch.com

9. Programming With Keystrokes    coderanch.com





10. Keystroke?    coderanch.com

12. Send Keystrokes from Java to Notepad    java-forums.org

I'm trying to develop a virtual keyboard to be used with text editors for spastic children. I use the Runtime class and exec method to spawn notepad. After spawning the process i need to send keystrokes to the notepad process. i.e., on click of a button in java frame, i need the corresponding char to be printed on the notepad. I ...

13. Keystroke Biometrics - help!    java-forums.org

Hi guys! I am trying to write my own code on the concepts of keystroke dynamics.. Does anyone know how to record, and perhaps, record the dwell time (time a key is pressed) and flight time (time the key is released)? I am not very familiar with recording time in programming.. Since, I am familiar with the Java language, a piece ...

14. enabling keystrokes    java-forums.org

hey, can anyone please help me why this code isn't accepting keyboard strokes and how to fix it? as it has been pointed out, this is INDEED a cross post between here and here for the obvious reason that my post remains unanswered. I apologize for any inconvenience; however, when I read FAQ's section about cross posting I thought it stands ...

15. help with GUI assign a keystroke    forums.oracle.com

To do that, you'll probably have to program out your own ActionListener.. It would be similar to the exitListener that you have above, except the code inside of it would be responsible for opening up a new Frame and I'd probably rename the class from exitListener to openListener (or some other such applicable name). Either way, it'll at least look similar ...

16. Capture keystrokes without GUI    forums.oracle.com

I am trying to write a program that will listen for keystrokes without a (visible) GUI. So sort of like a hotkey. There has to be a way to do this in Java. Since I was desperate, I looked into the Component source code to see how it reads input from the keyboard but couldn't find anything. I've searched for a ...