TechnionYP5777 / Bugquery

Bug query
9 stars 1 forks source link

Clipboard Shortcut in ClipboardDialog #49

Closed yosefraisman closed 7 years ago

yosefraisman commented 7 years ago

Currently class ClipboardDialog uses ctrl+v, which doesn't work in other OS'es (macOS expects ⌘+v). Instead, use getMenuShortcutKeyMask() from Toolkit to get the integer key mask representing the menu button in the OS.

yosefraisman commented 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.

yosefraisman commented 7 years ago

Implemented and tested on all platforms.