Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't rebind keybindings if selecting keybinding button by enter or space key in KeybindsScreen #9793

Closed
boholder opened this issue Nov 20, 2023 · 4 comments

Comments

@boholder
Copy link

Minecraft Version: 1.20.1

Forge Version: 1.20.1-47.0.19

Logs: No error log, even no relative info log khanshoaib3/minecraft-access#204

Steps to Reproduce:

  1. Go to Controls... -> Keybinds...
  2. Press Tab to select one keybinding button (first is Jump: Space IIRC)
  3. Press Enter or Space to select that keybinding and enter modify mode
  4. Press any key to modify the value of keybinding.

Description of issue:

Nothing happens when you perform step 4.
There is a workaround: Hold Enter when performing step 3, then press key you want to modify (the button text will change to modified key after pressing), then release all keys.

According to step by step debug, it seems like field this.selectedKeyBinding in KeybindsScreen can't be set correctly at/after step 3.
No problem when selecting keybinding with mouse clicking in step 3, no problem on Fabric (1.20.1), not sure if no problem on original game.

@boholder boholder added the Triage This request requires the active attention of the Triage Team. Requires labelling or reviews. label Nov 20, 2023
@autoforge autoforge bot removed the Triage This request requires the active attention of the Triage Team. Requires labelling or reviews. label Nov 29, 2023
@LexManos
Copy link
Member

Its not a problem on other systems, its caused by Forge's keybind modifier system. I've reworked it to address some of the issues but it needs to be readdressed later to remove some of the basic assumptions it makes.

LexManos added a commit that referenced this issue Nov 29, 2023
… when multiple modifiers are pressed.

Fix setting keybinds whel using keyboard inputs to select the menu. Closes #9793
@boholder
Copy link
Author

boholder commented Nov 30, 2023

Its not a problem on other systems, its caused by Forge's keybind modifier system. I've reworked it to address some of the issues but it needs to be readdressed later to remove some of the basic assumptions it makes.

Thank you for your quick work and detailed explanation! 👍
It seems like the keyPressed method doesn't work properly (detect key pressing in its if conditions) after step 3, but looking at your commits I realized it's not a small problem...

@LexManos
Copy link
Member

It functions properly in all the testing conditions I could think of. All methods, mouse, enter, and space all allow bindings to be changed properly including combinations with modifiers.

Is there still and issue in the latest version? If so can you please provide EXACT details on how to reprocude.

@boholder
Copy link
Author

Is there still and issue in the latest version?

My first reply is a comment on your commits, not a updating report, sorry for misleading you. And I can't find & download "the latest version" or "nightly version"... I'll update the situation if it's not fixed in the later versions in the future.

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

No branches or pull requests

2 participants