Applications using SDL will automatically grab the whole of the keyboard using XGrabKeyboard, even if some of the keys are of absolutely no use to it.
The code under src/video/x11 should allow for some of the key events to be passed to the desktop/root window.
Keys that would have been helpful in my case were brightness keys and volume keys.
Peter, any ideas how to achieve that?
The XGrabKeyboard is pretty hard-coded in SDL:
363 ↦ ↦ /* Now grab the keyboard */•
364 ↦ ↦ XGrabKeyboard(SDL_Display, WMwindow, True,•
365 ↦ ↦ ↦ ↦ GrabModeAsync, GrabModeAsync, CurrentTime);•
Bastien, SDL does not know which keys are used by the application, therefore if may and should not ignore keys.
Usually games have their own volume control. Media applications are handling media keys on their own and also brightness and volume. Think of xbmc for example. These are very good reasons not to break the current keyboard event behaviour.
I do investigation in this matter few years ago and I found it's a feature.
Imagine how wild gamblers felt, if they pressed wrong key and desktop
environment interrupted their game :) In addition a lot of games utilize keys
that clash with desktop shortcuts.
I think the grab could be optional (driven by an environment variable like
sound back-end selection). However I can not see any way how to differentiate
keys to pass to SDL and keys to pass to other X clients without SDL application
I propose to keyword this report as Feature request and pass it to upstream.
(In reply to comment #1)
> Peter, any ideas how to achieve that?
not without grab priorities, which are an idea to have for XI2.1 but far from execution. sorry.
you could sort-of get around it by passively grabbing the keys on the devices directly instead of on the master devices (core devices), but that only works now because no-one else does so. It'd be an arms race and sooner or later the same situation would present itself again.
This message is a reminder that Fedora 13 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 13. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora
'version' of '13'.
Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version prior to Fedora 13's end of life.
Bug Reporter: Thank you for reporting this issue and we are sorry that
we may not be able to fix it before Fedora 13 is end of life. If you
would still like to see this bug fixed and are able to reproduce it
against a later version of Fedora please change the 'version' of this
bug to the applicable version. If you are unable to change the version,
please add a comment here and someone will do it for you.
Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.
The process we are following is described here:
Fedora 13 changed to end-of-life (EOL) status on 2011-06-25. Fedora 13 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.
If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version.
Thank you for reporting this bug and we are sorry it could not be fixed.