Closed yosefraisman closed 7 years ago
Toolkit.getDefaultToolkit().getMenuShortcutKeyMask()
returns 2 instead of KeyEvent.VK_CONTROL
which is 0x11
(17) - which means that in my testing it types out 'v' in the input box, instead of pasting from the clipboard. Instead, let's use System.getProperty("os.name", "generic")
to decide on the shortcut.
Implemented and tested on all platforms.
Currently
class ClipboardDialog
usesctrl+v
, which doesn't work in other OS'es (macOS expects⌘+v
). Instead, usegetMenuShortcutKeyMask()
fromToolkit
to get the integer key mask representing the menu button in the OS.