From 3d0d144a5a493d226e8c422201b60b9e0e657231 Mon Sep 17 00:00:00 2001
From: travis guenther <57420975+tguen@users.noreply.github.com>
Date: Mon, 8 May 2023 16:58:44 -0700
Subject: [PATCH] add textbox shortcut ctrl+shift+z to redo
---
.../josm/gui/widgets/TextContextualPopupMenu.java | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/org/openstreetmap/josm/gui/widgets/TextContextualPopupMenu.java b/src/org/openstreetmap/josm/gui/widgets/TextContextualPopupMenu.java
index 6d3f93b33..cc91c54cf 100644
a
|
b
|
import static org.openstreetmap.josm.tools.I18n.tr;
|
5 | 5 | |
6 | 6 | import java.awt.GraphicsEnvironment; |
7 | 7 | import java.awt.event.ActionEvent; |
| 8 | import java.awt.event.InputEvent; |
8 | 9 | import java.awt.event.KeyEvent; |
9 | 10 | import java.beans.PropertyChangeListener; |
10 | 11 | |
… |
… |
public class TextContextualPopupMenu extends JPopupMenu {
|
101 | 102 | KeyStroke.getKeyStroke(KeyEvent.VK_Z, PlatformManager.getPlatform().getMenuShortcutKeyMaskEx()), undoAction); |
102 | 103 | component.getInputMap().put( |
103 | 104 | KeyStroke.getKeyStroke(KeyEvent.VK_Y, PlatformManager.getPlatform().getMenuShortcutKeyMaskEx()), redoAction); |
| 105 | component.getInputMap().put( |
| 106 | KeyStroke.getKeyStroke(KeyEvent.VK_Z, InputEvent.SHIFT_DOWN_MASK | PlatformManager.getPlatform().getMenuShortcutKeyMaskEx()), redoAction); |
104 | 107 | } |
105 | 108 | undoRedo = true; |
106 | 109 | } |
… |
… |
public class TextContextualPopupMenu extends JPopupMenu {
|
113 | 116 | KeyStroke.getKeyStroke(KeyEvent.VK_Z, PlatformManager.getPlatform().getMenuShortcutKeyMaskEx())); |
114 | 117 | component.getInputMap().remove( |
115 | 118 | KeyStroke.getKeyStroke(KeyEvent.VK_Y, PlatformManager.getPlatform().getMenuShortcutKeyMaskEx())); |
| 119 | component.getInputMap().remove( |
| 120 | KeyStroke.getKeyStroke(KeyEvent.VK_Z, InputEvent.SHIFT_DOWN_MASK | PlatformManager.getPlatform().getMenuShortcutKeyMaskEx())); |
116 | 121 | } |
117 | 122 | component.getDocument().removeUndoableEditListener(undoEditListener); |
118 | 123 | undoRedo = false; |