Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Setting button mnemonic key events without having to use ALT

Is there a way to set a button key event in Java so that Alt does not have to be pressed. For example, when this is used setMnemonic(KeyEvent.VK_DELETE) it is required for Alt + Delete to be pressed in the application. How can I get around this? Thanks.

like image 982
John Avatar asked Dec 28 '22 08:12

John


1 Answers

I would take a look at the key bindings tutorial. You can specify any KeyStroke to perform any Action.

like image 182
Jeffrey Avatar answered Feb 06 '23 14:02

Jeffrey