Skip to content

Commit

Permalink
[577134] Changed modifier check to allow arrow key scrolling
Browse files Browse the repository at this point in the history
With this fix scrolling with arrow key is now only possible when no
modifier key is pressed.

Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=577134
Change-Id: I5178bae011b9942a2a761432632487358c169b31
  • Loading branch information
azoitl committed Nov 8, 2021
1 parent df04979 commit 150d1fd
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@
public class AdvancedGraphicalViewerKeyHandler extends GraphicalViewerKeyHandler {
private static final int SCROLL_SPEED = 400;

public AdvancedGraphicalViewerKeyHandler(AdvancedScrollingGraphicalViewer viewer) {
public AdvancedGraphicalViewerKeyHandler(final AdvancedScrollingGraphicalViewer viewer) {
super(viewer);
}

@Override
public boolean keyPressed(KeyEvent event) {
boolean modifierPressed = (event.stateMask & SWT.MODIFIER_MASK) == 0;
public boolean keyPressed(final KeyEvent event) {
final boolean modifierPressed = (event.stateMask & SWT.MODIFIER_MASK) != 0;
switch (event.keyCode) {
case SWT.ARROW_DOWN:
if (!modifierPressed) {
Expand Down

0 comments on commit 150d1fd

Please sign in to comment.