The thing is, in Godot the modifier keys SHIFT, CTRL, ALT/OPTION and WINDOWS keys for
both the left and right side are considered as the same key. Pressing left CTRL should be different
than pressing the right CTRL. Same for the other modifier keys. In Godot, left and right modifier keys share the same scancode.
From my experience with DirectInput in DirectX, it can be done. although Godot does not use DI.
Also, provide an option to disable propagating the WINDOWS key event to the OS, when Godot window is focused. Again, it can be done in DirectInput but don't know how Godot deals with Input. Currently, when I set up an action to use the windows key in game, when pressing it the start menu pops up.
I think that we should have three options for each button: left, right and both. This means that for SHIFT, it becomes LEFT_SHIFT, RIGHT_SHIFT and SHIFT (this is to maintain compatibility and ease of use).
@RebelliousX ~ not propagating WINDOWS/META or any other modifier key (esp. ALT) to the OS, _would_ mean different behaviour on different OS-es and/or display managers, as this is quite unlikely to be doable on X11 linux, and probably impossible by design on Wayland. BTW, you shouldn't even expect such key events to reach your game, IMO.
I wouldn't expect to use the Windows key in a game. And in Windows 10 Win+G brings up the game bar, so this shortcut should pass through to the OS. So I don't think that stopping propagation is a good idea.
I also agree with @bojidar-bg about the three options for modifiers.
I wouldn't expect to use the Windows key in a game. And in Windows 10 Win+G brings up the game bar, so this shortcut should pass through to the OS. So I don't think that stopping propagation is a good idea.
+1, if using some of these keys in a game, be especially careful to cross-platform and cross-hardware compatibility. Many laptops have only one "windows" key for example, like on mine there is only a windows key on the right, and it's seen by xinput as "Left Windows" :)
I also agree with @bojidar-bg about the three options for modifiers.
The proposal is sensible yeah.
Well, I agree about the Win key and I get the point about game bar for recording gameplay. Also, the proposal of @bojidar-bg is good one to avoid breakage of old code.
What's the progress on this issue? Did anyone have luck implementing @bojidar-bg's proposal?
I haven't done anything on it, would be nice if somebody with multiple available platforms will try (since it might have to touch OS classes)
Anyone working on this?
Bump I too would like this feature
@andrewmwalker98 Please don't bump issues without contributing significant new information; use the :+1: reaction button on the first post instead.
See comments on #27991.
Most helpful comment
I think that we should have three options for each button:
left,rightandboth. This means that for SHIFT, it becomesLEFT_SHIFT,RIGHT_SHIFTandSHIFT(this is to maintain compatibility and ease of use).@RebelliousX ~ not propagating WINDOWS/META or any other modifier key (esp. ALT) to the OS, _would_ mean different behaviour on different OS-es and/or display managers, as this is quite unlikely to be doable on X11 linux, and probably impossible by design on Wayland. BTW, you shouldn't even expect such key events to reach your game, IMO.