I have implemented some hotkeys for a Swing application with InputMap, for example
getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(KeyStroke.getKeyStroke(KeyEvent.VK_A, Event.CTRL_MASK), "selectAll"); getActionMap().put("selectAll", new SelectAllAction());
It works fine. Now how can I do the same if I want to catch
CTRL + MouseWheelUp
I tried some combinations like
getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(KeyStroke.getKeyStroke(MouseEvent.MOUSE_WHEEL, Event.CTRL_MASK), "zoom");
bad luck
thanks
source share