Minor event mask refactor

This commit is contained in:
dragonmacher
2025-10-22 13:00:12 -04:00
parent c0978e538c
commit 04ef00b4a3
60 changed files with 283 additions and 225 deletions

View File

@@ -26,6 +26,7 @@ import java.util.Set;
import javax.swing.*;
import docking.ActionContext;
import docking.DockingUtils;
import docking.action.*;
import docking.widgets.fieldpanel.support.ViewerPosition;
import generic.theme.GIcon;
@@ -773,7 +774,7 @@ public class ProgramByteViewerComponentProvider extends ByteViewerComponentProvi
setDescription("Create a snapshot (disconnected) copy of this Bytes window ");
setHelpLocation(new HelpLocation("Snapshots", "Snapshots_Start"));
setKeyBindingData(new KeyBindingData(KeyEvent.VK_T,
InputEvent.CTRL_DOWN_MASK | InputEvent.SHIFT_DOWN_MASK));
DockingUtils.CONTROL_KEY_MODIFIER_MASK | InputEvent.SHIFT_DOWN_MASK));
}
@Override

View File

@@ -4,9 +4,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -19,6 +19,7 @@ import java.awt.event.InputEvent;
import java.awt.event.KeyEvent;
import docking.ActionContext;
import docking.DockingUtils;
import docking.action.*;
import generic.theme.GIcon;
import ghidra.framework.plugintool.Plugin;
@@ -31,7 +32,7 @@ class ToggleEditAction extends ToggleDockingAction {
this.provider = provider;
setToolBarData(new ToolBarData(new GIcon("icon.base.edit.bytes"), "Byteviewer"));
setKeyBindingData(new KeyBindingData(
KeyEvent.VK_E, InputEvent.CTRL_DOWN_MASK | InputEvent.ALT_DOWN_MASK));
KeyEvent.VK_E, DockingUtils.CONTROL_KEY_MODIFIER_MASK | InputEvent.ALT_DOWN_MASK));
setDescription("Enable/Disable editing of bytes in Byte Viewer panels.");
setSelected(false);