Bug#315361: Bug #315361 - [keyboard shortcuts] Music player shortcuts doesn't work

Alban browaeys browaeys.alban@wanadoo.fr, 315361-quiet@bugs.debian.org
Thu, 23 Jun 2005 15:50:27 +0200


Le jeudi 23 juin 2005 =E0 06:28 +0200, R=E9my Saissy a =E9crit :

> ok, look at the picture, the is the 0x49 which is F7 and
> XF86AudioPause which is F7 too. First bound gave me XF86AudioPrevious,
> second one XF86AudioStop... I tried it on a fresh installed system and
> on an older one.


Hum i have been through X symbols. XF86AudioStop and such are only
defined in the "inet" symbols file. This one defines special keys (named
after firsts internet keyboards) for specific keyboard layout . Like
ltcd for Logitech keyboards.=20

You might have to find out if your keyboard is supported in
gnome-keyboard-properties -> layout=20

or the hard way : /etc/X11/xkb/rules/xfree86 , inetkbds variable list
all the supported "inet" keyboards. (gnome
uses /etc/X11/xkb/rules/xfree86.xml though the previous one is easier
for humans to read).

The available keys for each keyboards are listed
in : /etc/X11/xkb/symbols/inet . Mine only support XF86WWW, XF86Search
and XF86Search for example.

If i want to map "Pause" in gnome to f7 , "F7" is the proper key name
('symbol').=20
Though if you want the other way round. That F7 fires up an
XF86AudioStop events that even non gnome applications can understand,
you would have to plays with the symbol file.

For example creating your own "inet" keyboard:

//my keyboard

partial alphanumeric_keys
xkb_symbols "my_keyboard" {
    name[Group1]=3D "My keyboard";

    key <###>   {       [ XF86AudioPlay, XF86AudioPause ] };
};

replacing ### by the X internal key name.=20

To find out which is the key name for F7 :
$  grep F7 /etc/X11/xkb/symbols/*

for my keyboard (french ) there is no mapping defined so it fails back
to the us :=20
/etc/X11/xkb/symbols/us: key <FK07> { [        F7             ]       };

Thus :

key <FK07>   {       [ XF86AudioPlay, XF86AudioPause ] };

then add "my_keyboard" to the inetkbds variable
in /etc/X11/xkb/rules/xfree86 .
And to /etc/X11/xkb/rules/xfree86.xml (copying from say ltcd example) if
you want it to shows up in your gnome-keyboard-properties keyboard
layout list .


Confusing isn't it ?

It all depends on what you are trying to achieve. Map a key to "Pause"
in gnome keyboard properties or make F7 fires up an XF86AudioStop X
event ...

Regards
Alban