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

bindKey and unbindKey fail to handle client key bindings correctly #4036

Open
1 task done
q8X opened this issue Feb 19, 2025 · 0 comments
Open
1 task done

bindKey and unbindKey fail to handle client key bindings correctly #4036

q8X opened this issue Feb 19, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@q8X
Copy link

q8X commented Feb 19, 2025

Describe the bug

Key bindings on the client end can get messed up when different resources use the same key, for example, if resource (A) on server (1) has command handler but no key is bound, and a client binds key '1' to 'bug' command, and then resource (B) on server (2) also uses '1' for 'bug', unbinding '1' for 'bug' on server (2) with unbindKey("1", "down", "bug") will totally remove the client's key binding, even after they've left server

this means they can't bind '1' to 'bug' or use the same bind key for a different resource, but resources still can bind a key, to fix this they need to restart the game to bind the key again

it should display as resource key bind, like this one in the image

Image

but if the client already bound a key with the same command, the key will be added as an alt key

Image

Steps to reproduce

  1. start runcode
  2. crun addCommandHandler("bug", function() outputChatBox("hi") end)
  3. type /bind 1 bug
  4. crun bindKey("1","down","bug")
  5. crun unbindKey("1","down","bug")
  6. use the same bind key with different server

Version

No response

Additional context

No response

Relevant log output

Security Policy

  • I have read and understood the Security Policy and this issue is not security related.
@q8X q8X added the bug Something isn't working label Feb 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant