mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-03 01:39:21 +02:00
Merge remote-tracking branch 'origin/GP-5978-dragonmacher-alt-graph-fix'
(Closes #8205)
This commit is contained in:
commit
59bcbba8cf
1 changed files with 2 additions and 24 deletions
|
@ -15,7 +15,6 @@
|
|||
*/
|
||||
package docking.action;
|
||||
|
||||
import java.awt.event.InputEvent;
|
||||
import java.beans.PropertyChangeEvent;
|
||||
import java.beans.PropertyChangeListener;
|
||||
import java.util.*;
|
||||
|
@ -103,9 +102,6 @@ public class KeyBindingsManager implements PropertyChangeListener {
|
|||
|
||||
// map standard keystroke to action
|
||||
doAddKeyBinding(provider, action, keyStroke);
|
||||
|
||||
// map workaround keystroke to action
|
||||
fixupAltGraphKeyStrokeMapping(provider, action, keyStroke);
|
||||
}
|
||||
|
||||
public String validateActionKeyBinding(DockingActionIf dockingAction, KeyStroke ks) {
|
||||
|
@ -145,24 +141,6 @@ public class KeyBindingsManager implements PropertyChangeListener {
|
|||
return null;
|
||||
}
|
||||
|
||||
private void fixupAltGraphKeyStrokeMapping(ComponentProvider provider, DockingActionIf action,
|
||||
KeyStroke keyStroke) {
|
||||
|
||||
// special case
|
||||
int modifiers = keyStroke.getModifiers();
|
||||
if ((modifiers & InputEvent.ALT_DOWN_MASK) == InputEvent.ALT_DOWN_MASK) {
|
||||
//
|
||||
// Also register the 'Alt' binding with the 'Alt Graph' mask. This fixes the but
|
||||
// on Windows (https://bugs.openjdk.java.net/browse/JDK-8194873)
|
||||
// that have different key codes for the left and right Alt keys.
|
||||
//
|
||||
modifiers |= InputEvent.ALT_GRAPH_DOWN_MASK;
|
||||
KeyStroke updateKeyStroke =
|
||||
KeyStroke.getKeyStroke(keyStroke.getKeyCode(), modifiers, false);
|
||||
doAddKeyBinding(provider, action, updateKeyStroke, keyStroke);
|
||||
}
|
||||
}
|
||||
|
||||
private void doAddKeyBinding(ComponentProvider provider, DockingActionIf action,
|
||||
KeyStroke keyStroke) {
|
||||
doAddKeyBinding(provider, action, keyStroke, keyStroke);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue