Skip to content

Commit

Permalink
Fix keybdining in entry editor in localized installation (#3030)
Browse files Browse the repository at this point in the history
Check keycode to avoid localization problems
  • Loading branch information
Siedlerchr authored Jul 20, 2017
1 parent 2cb06eb commit 6c4e71c
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ public Optional<KeyBinding> mapToKeyBinding(KeyEvent keyEvent) {
}

public Optional<KeyBinding> mapToKeyBinding(java.awt.event.KeyEvent keyEvent) {
Optional<KeyCode> keyCode = Arrays.stream(KeyCode.values()).filter(k -> k.getName().equals(keyEvent.getKeyText(keyEvent.getKeyCode()))).findFirst();
Optional<KeyCode> keyCode = Arrays.stream(KeyCode.values()).filter(k -> k.impl_getCode() == keyEvent.getKeyCode()).findFirst();
if (keyCode.isPresent()) {
KeyEvent event = new KeyEvent(keyEvent.getSource(), null, KeyEvent.KEY_PRESSED, "", "", keyCode.get(), keyEvent.isShiftDown(), keyEvent.isControlDown(), keyEvent.isAltDown(), keyEvent.isMetaDown());
return mapToKeyBinding(event);
Expand Down

0 comments on commit 6c4e71c

Please sign in to comment.