Bug 528147 - KeyEvent#isShiftDown() and #isControlDown() never return true for an initial key press event
Summary: KeyEvent#isShiftDown() and #isControlDown() never return true for an initial ...
Status: NEW
Alias: None
Product: GEF
Classification: Tools
Component: GEF MVC (show other bugs)
Version: 5.0.1   Edit
Hardware: All Mac OS X
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: gef-inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-12-05 06:53 EST by Matthias Wienand CLA
Modified: 2017-12-05 06:53 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Matthias Wienand CLA 2017-12-05 06:53:11 EST
Currently, the TraverseFocusOnTypeHandler and SelectFocusedOnTypeHandler query KeyEvent#isShiftDown() and #isControlDown() for determining the focus traversal direction or the selection mode, respectively.

However, the #isShiftDown() and #isControlDown() methods never return true for the initial key press event, because all key codes except for SPACE and TAB are discarded.

In order to be able to traverse focus in both directions (instead of only forwards), as well as appending to the current selection (instead of replacing it), the SHIFT and CONTROL modifiers need to be checked in the press(KeyEvent) callback method instead of the initialPress(KeyEvent) callback method.