-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Rebindable keyboard controls #1891
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In general, I like what you've done with the token stuff.
I don't really like the single quotes for character key definitions, but I haven't really thought of a better format yet. I'll think on it.
Additionally, I will look at implementing support for TOML arrays in our config reader/writer so we can have that without having a custom thing just for keybinds. |
All the issues you pointed out should now be fixed. I think it would make them look quite natural: Bind the S key to dpad down when caps lock or shift are enabled, and to left thumb down otherwise: (notice ^ and _ preceding the char/keycode)
|
0851257
to
5d2917a
Compare
( |
You can selectively toggle off and on clang-format. Surround it with:
|
I must be doing something wrong, but even with those lines, |
721c80f
to
820617c
Compare
Can this get merged or is any other change necessary? |
This pull request makes it possible to rebind the keyboard controls in the xenia config file. This fixes #1333.
It supports switching layers using caps lock (as the current default key bindings) and multiple keys for the same gamepad input.
I acknowledge that the syntax is a bit awkward, and I would be happy to get some feedback on how I can improve it while maintaining compatibility with xenia's current key bindings.
As it stands, the syntax works like this:
keybind_a = "0xBA"
# binds key code 0xBA to the A buttonkeybind_b = "'X'"
# binds the X key to the B button. Chars are indicated by'
as per C convention.keybind_a = "0xBA"
# binds key code 0xBA to the A buttonkeybind_right_trigger = "'E' 'O'"
# binds both keys E and O to the right trigger. Space is used as a separator.Bind the S key to dpad down when caps lock or shift are enabled, and to left thumb down otherwise: (notice ^ and _ preceding the char/keycode)