keyremapping: Don't remap f-keys when the bank pin interface is open

This commit is contained in:
loldudester
2020-05-19 20:51:29 +01:00
committed by GitHub
parent 0615b7b9e6
commit 94482f5aed
3 changed files with 11 additions and 1 deletions

View File

@@ -138,7 +138,10 @@ public class KeyRemappingPlugin extends Plugin
// Most chat dialogs with numerical input are added without the chatbox or its key listener being removed,
// so chatboxFocused() is true. The chatbox onkey script uses the following logic to ignore key presses,
// so we will use it too to not remap F-keys.
return isHidden(WidgetInfo.CHATBOX_MESSAGES) || isHidden(WidgetInfo.CHATBOX_TRANSPARENT_LINES);
return isHidden(WidgetInfo.CHATBOX_MESSAGES) || isHidden(WidgetInfo.CHATBOX_TRANSPARENT_LINES)
// We want to block F-key remapping in the bank pin interface too, so it does not interfere with the
// Keyboard Bankpin feature of the Bank plugin
|| !isHidden(WidgetInfo.BANK_PIN_CONTAINER);
}
private boolean isHidden(WidgetInfo widgetInfo)