Skip to content

Comments

Fix: Use KeyBinding instead of hardcoded K key in command window#24

Open
tember8003 wants to merge 1 commit intoYuvDwi:mainfrom
tember8003:fix/keybinding-in-command-window
Open

Fix: Use KeyBinding instead of hardcoded K key in command window#24
tember8003 wants to merge 1 commit intoYuvDwi:mainfrom
tember8003:fix/keybinding-in-command-window

Conversation

@tember8003
Copy link

Fix: user key binding in command window

When the user changes the toggle GUI key binding from K to another key (e.g., apostrophe), the command window would still close when pressing K. The new key binding would only work to open the window, but K would always close it.

SteveOverlayScreen.java was checking for hardcoded keyCode == 75 (K key) instead of using the configured key binding.

-> Replaced hardcoded keyCode == 75 check with KeyBindings.TOGGLE_GUI.matches(keyCode, scanCode)

Tested

  • Tested with default K key binding : Work
  • Tested with custom key binding (apostrophe): Work
  • Confirmed K key can now be typed in command window without closing it when rebound

Fixes the issue where key binding configuration was inconsistent between opening and closing the GUI.

Copy link

@Maxencehabar Maxencehabar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perfect fix for being able to type K in chat

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants