-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
Added support for left- and right- versions of modifier keys. #43888
Added support for left- and right- versions of modifier keys. #43888
Conversation
3c9caf4
to
f35049f
Compare
How do we allow for users to set a key to be "Any Shift/Control/Alt", so it doesn't matter which of left/right is pressed? Do we want this functionality? Sometimes they may just want alt/shift/ctrl to be pressed generically, rather than a specific side. This might also go for editor shortcuts where we currently use KEY_CONTROL for things like going to definition in the Script editor... this might have to be changed to KEY_LEFT_CONTROL unless there is a way to make KEY_CONTROL represent any control key. Please also note that since Mac does not differentiate between Left and Right Command, I have kept "Meta" as one key and have not split it into Left/Right variants. |
94f2558
to
b9bcbfb
Compare
Related: #3347 |
|
cf00199
to
be1e658
Compare
Ok, I implemented my idea in the most recent commit. I actually quite like it and think it is a pretty clean way of checking "is any shift key pressed", etc. Interested in feedback. Look thru the commits one at a time and things should make more sense :) It also removes a few |
e00505b
to
1325962
Compare
1325962
to
4acb02c
Compare
Took it out of draft and rebased... I can't test on Mac/Linux/others so if someone could vet the changes I made there it would be much appreciated. |
b1392bd
to
3398607
Compare
Adds the ability to use Left/Right Shift, Control, Alt and Meta as key bindings. These keys being used as modifiers (e.g. Shift+Ins, Ctrl+T) is unchanged, and either left or right will work. References used: https://docs.microsoft.com/en-us/windows/win32/inputdev/virtual-key-codes https://www.win.tue.nl/~aeb/linux/kbd/scancodes-1.html
3398607
to
1158b7e
Compare
We discussed in PR review meeting that there does not seem to be a lot of demand for this and the way things work appear to be more accessible for the majority of users. Even if you used this for having multiple inputs (players) in a single keyboard, a lot of keyboards don't really work well when many of these keys are pressed. It would be nice to understand better which kind of use cases make this a necessary feature. |
@reduz There is some decent support in the below issues for this functionality. #3347 I don't mind either way, at the time it was something that had been an outstanding issue for a while, and was one possible way of resolving #6851 I am not sure if @bruvzg was in the meeting and if he has any opinions on it (as he resolved the above issue in one of his PRs) If this is decided against then the related issues and proposal should also be closed then I assume. |
@reduz well, I don't know if this would qualify as "necessary feature", but pinball games typically use right and left shift keys to activate the respective flippers. Sometimes right and left Ctrl are then used to perform the "nudge" to simulate a "hit" in the machine from the respective side. While it would be possible to use different keys, I don't think it would be ideal to shift away from something that is somewhat "established". |
@Kehom I know, the problem is the added complexity this creates. @EricEzaM Maybe one solution would be that we can have both something like It would probably need an option in the input action settings (editor shortcut config likely fine ignoring this) when recording them that you want to discern between using the modifier side or not. Like "[x] sided modifiers" |
@bruvzg Can you be a tie-breaker and weigh in on the proposed options? |
Not against it, but I do not think it's many use cases. Not every keyboard have both right and left key options, so it's definitly should have a way to map any of laft/right keys not just a specific one. I would probably add an extra |
@bruvzg that sounds like it could cause some confusion to some people as they might expect that it'd denote the physical position of the key (for example f is left and j is right). |
I guess nothing prevents us from actually setting l/r flags for all keys it this way (not sure why anyone would want it, bit it won't conflict with anything). |
At this stage I will not be continuing with this pull request. Anyone else is welcome to pick up the scraps if they are motivated to do so. |
A bit late to the party, but @reduz another use case is the arcade DIY crowd: a very popular way to hook arcade sticks & buttons is usin IPAC-2 & IPAC-4 which are devices that simulate a keyboard. The default mapping relies on left & right shift & control keys (see https://www.ultimarc.com/control-interfaces/i-pacs/i-pac2/ ). |
As reduz mentioned above, I think it needs to be reimplemented this way to be considered:
4.0 is in feature freeze, so such a change will probably have to wait until 4.1 at least to be merged. |
This solutions suits me, as I don't need the modifier status, and even if I needed it, I could implement it in my project, This means opening a new pull request, simpler than this one, I suppose ? |
@SchwingSK you could, but you'd have to wait quite some time for it to be merged. |
Adds the ability to use Left/Right Shift, Control, Alt and Meta as key bindings.
These keys being used as modifiers (e.g. Shift+Ins, Ctrl+T) is unchanged, and either left or right will work.
References used:
https://docs.microsoft.com/en-us/windows/win32/inputdev/virtual-key-codes
https://www.win.tue.nl/~aeb/linux/kbd/scancodes-1.html
Will close issues:
Closes #3347.