key remapping: don't remap space in options dialog
The options dialog never accepts space, so remapping a key to it doesn't make sense, and it is possible the original key was one of the keys actually being listened for
This commit is contained in:
@@ -155,7 +155,9 @@ class KeyRemappingListener implements KeyListener
|
||||
}
|
||||
}
|
||||
|
||||
if (plugin.isDialogOpen() && config.space().matches(e))
|
||||
// Do not remap to space key when the options dialog is open, since the options dialog never
|
||||
// listens for space, and the remapped key may be one of keys it listens for.
|
||||
if (plugin.isDialogOpen() && !plugin.isOptionsDialogOpen() && config.space().matches(e))
|
||||
{
|
||||
mappedKeyCode = KeyEvent.VK_SPACE;
|
||||
}
|
||||
|
||||
@@ -144,6 +144,11 @@ public class KeyRemappingPlugin extends Plugin
|
||||
|| !isHidden(WidgetInfo.BANK_PIN_CONTAINER);
|
||||
}
|
||||
|
||||
boolean isOptionsDialogOpen()
|
||||
{
|
||||
return client.getWidget(WidgetInfo.DIALOG_OPTION) != null;
|
||||
}
|
||||
|
||||
private boolean isHidden(WidgetInfo widgetInfo)
|
||||
{
|
||||
Widget w = client.getWidget(widgetInfo);
|
||||
|
||||
Reference in New Issue
Block a user