Skip to content

Commit

Permalink
Added workaround for + on Mac as well.
Browse files Browse the repository at this point in the history
  • Loading branch information
Oliver-Loeffler committed Mar 30, 2023
1 parent addcd87 commit fdec9b9
Showing 1 changed file with 10 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1342,18 +1342,23 @@ public void handleAdditionalZoomAccelerators(KeyEvent event) {
return;
}

if (EditorPlatform.IS_MAC && "+".equals(event.getText())) {
runActionController(zoomInController, event);
return;
}

if (event.isShiftDown()) {
handleArrowKeysForZoom(event);
} else {
} else {
handleNumPadKeys(event);
}
}

private void handleNumPadKeys(KeyEvent event) {
switch(event.getCode()) {
switch (event.getCode()) {
case ADD -> runActionController(zoomInController, event);
case SUBTRACT ->runActionController(zoomOutController, event);
default -> {/* no action*/}
case SUBTRACT -> runActionController(zoomOutController, event);
default -> { /* no action*/ }
}
}

Expand All @@ -1363,7 +1368,7 @@ private void handleArrowKeysForZoom(KeyEvent event) {
case UP -> runActionController(zoomInController, event);
case LEFT -> runActionController(zoomOutController, event);
case DOWN -> runActionController(zoomOutController, event);
default -> {/* no action*/}
default -> { /* no action*/ }
}
return;
}
Expand Down

0 comments on commit fdec9b9

Please sign in to comment.