From 8a728c1053e174bbbf15648446824e20fea99fe5 Mon Sep 17 00:00:00 2001 From: Adam Date: Sat, 13 Feb 2021 22:32:06 -0500 Subject: [PATCH] key remapping: set press enter to chat text regardless of chatbox focus I can't figure out why this was originally added, but this shouldn't care about the chatbox focus state since the script event is in the script which builds the chatbox input widget. This is currently causing an issue where the input rebuild script runs immediately before the chatbox input keylistener is reapplied when closing input dialogs. --- .../client/plugins/keyremapping/KeyRemappingPlugin.java | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/keyremapping/KeyRemappingPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/keyremapping/KeyRemappingPlugin.java index a1b1034b26..6a8d060b9c 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/keyremapping/KeyRemappingPlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/keyremapping/KeyRemappingPlugin.java @@ -162,12 +162,9 @@ public class KeyRemappingPlugin extends Plugin { case SCRIPT_EVENT_SET_CHATBOX_INPUT: Widget chatboxInput = client.getWidget(WidgetInfo.CHATBOX_INPUT); - if (chatboxInput != null) + if (chatboxInput != null && !typing) { - if (chatboxFocused() && !typing) - { - setChatboxWidgetInput(chatboxInput, PRESS_ENTER_TO_CHAT); - } + setChatboxWidgetInput(chatboxInput, PRESS_ENTER_TO_CHAT); } break; case SCRIPT_EVENT_BLOCK_CHAT_INPUT: