How are the XF86Audio* function keys mapped? Confused.
Linux - DesktopThis forum is for the discussion of all Linux Software used in a desktop context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
The tool `xev` will not display any keysym/keycode values at all, so i cannot map them correctly using `xmodmap`.
However, when launching something such as `kmix` in the background, the keys are suddenly recognized, also showing useful information within `xev`...
* XF86AudioMute
Code:
KeyRelease event, serial 38, synthetic NO, window 0x3600001,
root 0x1ce, subw 0x0, time 869236, (956,323), root:(958,341),
state 0x0, keycode 121 (keysym 0x1008ff12, XF86AudioMute), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
* XF86AudioRaiseVolume
Code:
KeyRelease event, serial 36, synthetic NO, window 0x3600001,
root 0x1ce, subw 0x0, time 926386, (638,441), root:(640,459),
state 0x0, keycode 123 (keysym 0x1008ff13, XF86AudioRaiseVolume), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
* XF86AudioLowerVolume
Code:
KeyRelease event, serial 36, synthetic NO, window 0x3600001,
root 0x1ce, subw 0x0, time 929258, (638,441), root:(640,459),
state 0x0, keycode 122 (keysym 0x1008ff11, XF86AudioLowerVolume), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
Given that useful output, where `kmix` is doing something to get the keys working, i place this into my ~/.Xmodmap and run `xmodmap ~/.Xmodmap` when my window manager starts;
Yet, this doesn't solve / change anything. As long as a tray utility such as `kmix` isn't running, the keys simply don't register.
Is there something i can do to get these function keys to work correctly without the use of something such as `kmix` ? It seems `kmix` is doing something to properly map these keys, which is simply not set beforehand.
You already identified the problem: kmix (or the K desktop environment) does something to initialise these keys.
I suspect this "something" has something to do with udev or dbus.
You already identified the problem: kmix (or the K desktop environment) does something to initialise these keys.
I suspect this "something" has something to do with udev or dbus.
Well yes, but i'm probably asking what exactly it is doing, whether it's something that can be set permanently.
I have had a look at xbindkeys, although that seems to control binds/commands directly, i'd much prefer keybinds to be set from my actual window manager config in the case of AwesomeWM.
All desktop/wm is launched using `startx` also.
On Slackware there is a proper initialisation /etc/X11/xinit/xinitrc.awesome eg;
On Slackware there is a proper initialisation /etc/X11/xinit/xinitrc.awesome eg;
"e.g." meaning you're not actually using it?
Does Slackware use ~/.xinitrc?
On my arch system, I had to add this stanza at some point, otherwise some functionality was missing:
Code:
if [ -d /etc/X11/xinit/xinitrc.d ]
then
for f in /etc/X11/xinit/xinitrc.d/*
do
[ -x "$f" ] && . "$f"
done
unset f
fi
"e.g." meaning you're not actually using it?
Does Slackware use ~/.xinitrc?
On my arch system, I had to add this stanza at some point, otherwise some functionality was missing:
Code:
if [ -d /etc/X11/xinit/xinitrc.d ]
then
for f in /etc/X11/xinit/xinitrc.d/*
do
[ -x "$f" ] && . "$f"
done
unset f
fi
Yes i am using it. Slackware has a tool called xwmconfig to switch. When you select, for eg; "KDE" or "Awesome", it will copy over the correct xinitrc.{plasma,awesome,xfce} to /etc/X11/xinit/xinitrc , so it's contents are being run on my system as for dbus/ck/xmodmap etc.
Code:
$ diff /etc/X11/xinit/xinitrc /etc/X11/xinit/xinitrc.awesome -s
Files /etc/X11/xinit/xinitrc and /etc/X11/xinit/xinitrc.awesome are identical
edit; I also do not personally use a local ~/.xinitrc -- only rely on the /etc/X11/xinitrc/* file.
edit 2; You mention you have an Arch system, do you get the same problem with barebones window managers? As for the WM supporting keybind customization yet XF86Audio* not responding to xev? I recall having the same issue on Arch when i last ran it (although this may be ~2011-2012, a long time ago). Oddly, i've always had the other keys such as XF86Tools, XF86Mail etc, these all work without any additional software.
I might have to skim through kmix source, or even the xfce mixer, to see what's being done to map these key/symbols. I can't see it being much more than a simple udev/dbus command which you previously suggested may be the cause.
/etc/X11/xinit/xinitrc , so it's contents are being run
I think you should take a closer look at these contents; compare the content of the KDE one with the content of the one that does NOT work as expected.
Otherwise, it's simply kmix itself - or KDE itself - doing the magic. How to research that?
Quote:
do you get the same problem with barebones window managers? As for the WM supporting keybind customization yet XF86Audio* not responding to xev?
No.
But this is often hardware specific.
Could also be kernel specific (even though KDE does recognize the keys).
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.