Hi All,
Can any one tell how to get the Ascii value of F4 when F4 is pressed?
Thanks and Regards
Kavitha
Printable View
Hi All,
Can any one tell how to get the Ascii value of F4 when F4 is pressed?
Thanks and Regards
Kavitha
Do you mean the constant field value for the key? From the KeyEvent api:
KeyEvent.VK_F4 = 115
Hi Hardwired,
Can you tel me how to get the key Pressed event at runtime?
Please can you send me any code or example ..
Implement the key listener
Hi Abdul,
I am not getting how to get the keyboard event on press of F4?
can you expalin me with example?
KeyStroke group = KeyStroke.getKeyStroke(KeyEvent.VK_F4);
tfGroup.getInputMap().put(group, "Group");
Action groupAction = new AbstractAction() {
public void actionPerformed(ActionEvent e) {
// add ur code here
}
};
tfGroup.getActionMap().put("Group", groupAction);
here tfGroup is TextField(Java Component) . when the Focus is on this tfGroup then press F4 .