SDLBackend: do not leak Super+KEY shortcuts to DE#2157
Open
pchome wants to merge 1 commit into
Open
Conversation
Some gamescope shortcuts are DE default shortcuts. For example `Super+I` is KDE Plasma Settings shortcut, and `Super+B` is Power Profile Switch in Plasma Power Management. Funny enough `Super+G` is the default shortcut too, but keyboard grab seems resets the key modifier (?) so it not detected by DE. Also user must press the Super key again after that for other gamescope shorts to work. Maybe a bit hackky solution is to temporary grab keyboard (if not already grabbed) while the Super key remain pressed and release grab when the key released. During the key grab we lose key modifier (as was mentioned above), so the same toggle-variable used as alternative modifier indicator. NOTE: DE will not receive Super+KEY shortcuts in this case. If there were some important ones for users (e.g. Super+PrintScreen). Issue: ValveSoftware#2156
Author
|
To debug SDL events use |
|
Would be better to have user-defined keybinds than stealing a key globally. |
Author
|
Yeah, I guess. So this solution is rather bad, PR can be closed if no other plans. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Some gamescope shortcuts are DE default shortcuts.
For example
Super+Iis KDE Plasma Settings shortcut, andSuper+Bis Power Profile Switch in Plasma Power Management.Funny enough
Super+Gis the default shortcut too, but keyboard grab seems resets the key modifier (?) so it not detected by DE. Also user must press the Super key again after that for other gamescope shorts to work.Maybe a bit hackky solution is to temporary grab keyboard (if not already grabbed) while the Super key remain pressed and release grab when the key released.
During the key grab we lose key modifier (as was mentioned above), so the same toggle-variable used as alternative modifier indicator.
NOTE: DE will not receive Super+KEY shortcuts in this case. If there were some important ones for users (e.g. Super+PrintScreen).
Closes: #2156