Xfce Forum

Sub domains
 

You are not logged in.

#1 2015-02-26 22:43:14

coltswalker
Member
From: USA
Registered: 2015-02-26
Posts: 4

[Solved] Default Location for Multimedia Key Mapping in Xfce

I would like to understand where and how the default keyboard mapping for Xfce are stored.  When I press a media key on my wireless keyboard, such as the "play" or "volume up" key, I see a graphic overlay on the screen.  For the first, a "no disc" indicator and for the second a graphic representation of the volume level.

It is understood that there is a "keyboard preferences" customization interface in Xfce.  It is also understood that xbindkeys can be installed and used for customization.  In the absence of any customization and xbindkeys not installed it is noticed that multimedia keys have a default mapping in Xfce.

Using "xev" to monitor and detect the scancode, I noticed that xev won’t produce a code for the multimedia keys.  Something in Xfce intercepts the keypress.  However, if I hold down the SHIFT key and press a multimedia key, such as volume down, I see both the scancode for SHIFT and the scancode for volume down.

With no xbindkeys installed, on a Ubuntu / Xfce system I am not able to locate any configuration file with default key mappings.  What in Xfce is intercepting multimedia keys and assigning an action to them?  Is it hard-coded into Xfce and compiled in one of the binaries?

Offline

#2 2015-02-26 22:50:13

hjudt
Member
Registered: 2014-11-27
Posts: 21

Re: [Solved] Default Location for Multimedia Key Mapping in Xfce

Could be the mixer plugin if you have it installed and the option was activated at compile time.

Offline

#3 2015-02-26 23:35:23

coltswalker
Member
From: USA
Registered: 2015-02-26
Posts: 4

Re: [Solved] Default Location for Multimedia Key Mapping in Xfce

Ubuntu PulseAudioMixer

I don't think that explains Play, Back, Forward, Last Track, Next Track, Stop, Pause.

Last edited by coltswalker (2015-02-26 23:43:28)

Offline

#4 2015-02-27 19:52:16

coltswalker
Member
From: USA
Registered: 2015-02-26
Posts: 4

Re: [Solved] Default Location for Multimedia Key Mapping in Xfce

Sharing some of what I have discovered here: 
<blockquote cite="https://wiki.ubuntu.com/NotifyOSD#Volume_changes">"When you change the display’s or keyboard backlight’s brightness using keyboard hotkeys, the change in brightness should be shown in a confirmation bubble with a gauge. "</blockquote>  This is the KNotification API.  https://wiki.ubuntu.com/NotifyOSD#Volume_changes  The Xfce desktop I see it for volume up and down, those seem to be mapped in the distribution I use - Xubuntu. 

* https://wiki.ubuntu.com/NotifyOSD#Volume_changes

What's it trapped by? 

The kernel generates the scancode.  A scancode != keycode.  There is a mapping for scancode to keycode apparently at the kernel level.  When I map a scancode to a different key with xmodmap there isn't a problem unless the scancode is already assigned to something, a good example is volume up and down.  The new mapping doesn't apply after running xmodmap, however, will stop functionality of the volume control.  Moreover, if I reboot the system, then the new mapping will take effect.  Again, this was tested on Xubuntu installation of Xfce, defaults.  I found that interesting.

Keycode values once were mapped to a text string called a keysym in a file called XF86keysym.h and I assume that is still the case.  I suppose that is compiled into the kernel, correct me if I am wrong.  Here is a sample XF86keysym.h file:
* http://wiki.robotz.com/index.php?title= … edirect=no

I can use those keysym strings less the first three characters in the string "XK_" making, for example, the right superkey (windows key) XK_Super_R code "Super_R."  Media keys absent.  The media keys or hotkeys I found on the Xfce FAQ at:
* https://wiki.xfce.org/faq#keyboard

Volume Up and Down: keycode 176 = XF86AudioRaiseVolume and keycode 174 = XF86AudioLowerVolume

It seems that, as hjudt suggested, my mixer "PulseAudioMixer" intercepted those keycodes activating the KNotification API (or the Xfce equivelant) displaying the graphic overlay of the volume level while adjusting PulseAudioMixer and ALSA (correct me if I am wrong).  Even though other modkeymap customizations worked immediately after running "xmodkeymap .Xmodkeymap" I had to reboot for it to override PulseAudioMixer and ALSA.

Offline

Board footer

Powered by FluxBB