Ticket #358 (accepted task)
Work on keystroke acceleration for IJ2
| Reported by: | bdezonia | Owned by: | bdezonia |
|---|---|---|---|
| Priority: | major | Milestone: | imagej-2.0.0 |
| Component: | ij-ui | Version: | |
| Severity: | serious | Keywords: | |
| Cc: | Blocked By: | ||
| Blocking: |
Description
Figure out how to get keyboard accelerators to work in IJ2. Implement in Swing and AWT UI's. Learn from IJ1 as appropriate.
Change History
comment:2 Changed 15 months ago by bdezonia
Determined the correct syntax to use in plugins. Implemented these changes in current plugins. Changed code in IJ2 to support Command/Control differences for Mac/other OSes. Allow X as shortcut for "control X" in plugin accelerator definitions.
comment:3 Changed 15 months ago by bdezonia
TODO - learn how to put accelerators in AWT menus and then implement for out AWT UI. Pretty sure code can be stolen from IJ1. Come up with UI agnostic way to support adding menu accelerators and then use in AWT & Swing UIs.
comment:4 Changed 14 months ago by bdezonia
note - if this will take more than a few hours push to another milestone
comment:5 Changed 14 months ago by bdezonia
Implemented an Accelerator class in AWTMenuCreator that enables keystroke accelerators in the AWT UI. This class is large and does not support all uniocde or non-QWERTY keyboard layouts. (The QWERTY issue arises because there is no KeyStroke key code for some characters such as question mark). It does however avoid a Swing dependency. The Accelerator class should be moved to its own class. But maybe we should retire it completely and require the AWT UI to have a Swing dependency. If we run into systems that have AWT and not Swing we'll address this issue at that time.
