I’m not able to do it… I’m able to catch command+’W’ (big W), but not command+’w’. I see the Max File menu blinking in the background when I press it (my JDialog has focus).
I did once in my MXJ stuff:
‘X’, ‘x’, ‘C’, ‘c’, ‘V’, ‘v’, ‘W’, ‘w’, ‘Z’, ‘z’, ‘A’, ‘a’,
I tried to do it before/after opening the JDialog, but same problem.
I feel MaxSystem.registerCommandAccelerators does nothing… Or I’m not using it properly.
I’m sure it’s called, as I put a trace when I call it.
I’m sure I can catch everything from keyboard, as every single key press is reported to my KeyEventDispatcher, registered to the main KeyboardFocusManager.
But no, command+w is not catched.
How can I achive this ? I want to catch it to implement in my java dialogs the window closing behaviour of this shortcut.
Log in to reply
SUBSCRIBE TO OUR NEWSLETTER
C74 RSS Feed | © Copyright Cycling '74 | Terms & Conditions