Differences between revisions 5 and 6
Revision 5 as of 2008-02-04 21:55:31
Size: 1820
Comment:
Revision 6 as of 2008-02-04 22:55:28
Size: 2810
Comment:
Deletions are marked like this. Additions are marked like this.
Line 29: Line 29:
  * For example: Choose a name in {{{/ur/share/X11/XKeysymDB}}}. ''Note that xmodmap manual refer to /usr/'''lib'''/X11/XKeysymDB, but it's wrong on my Debian Etch open a bug ?''
 * For example:
Line 31: Line 32:
keycode 160 = MediaSoundMute
keycode 174 = MediaSoundDown
keycode 176 = MediaSoundUp
keycode 162 = MediaPlay
keycode 144 = MediaPrevious
keycode 145 = MediaNext
keycode 164 = MediaStop
keycode 237 = MediaHome
keycode 160 = XF86AudioMute
keycode 174 = XF86AudioLowerVolume
keycode 176 = XF86AudioRaiseVolume
keycode 162 = XF86AudioPlay
keycode 144 = XF86AudioPrev
keycode 145 = XF86AudioNext
keycode 164 = XF86AudioStop
keycode 237 = XF86HomePage
Line 41: Line 42:
 * To apply that, run:
{{{
xmodmap ~/.xmodmaprc
}}}

== Autostart for KDE ==
 * To load your change at startup, create a file ~/.kde/Autostart/xmodmap.sh:
{{{
#!/bin/sh
xmodmap ~/.xmodmaprc
}}}

 * File must be executable
{{{
chmod +x ~/.kde/Autostart/xmodmap.sh
}}}

= Assign action on your keys =
== Under KDE ==
=== Input Action ===
 * Go to
{{{
K > Configuration > Regional & Accessibility > Input Action
}}}

 * Create new group called "Multimedia"
 * Create new action
 
=== Global shortcut ===
In all application supporting DCOP calls, you can assign your multimedia as short key. It's a very powerful feature.

Example with Kmix:
 * Open {{{K > Multimedia > Kmix sound mixer}}}
 * Show Mixer Window
 * Go to {{{Setting > Configure Global Shortcuts... }}}
Line 43: Line 79:
 

(!) [:/Discussion:Discussion]


To day, lot of keyboard have additional keys. Here, we show how to use them. This article is based on this very VERY good [http://www.lea-linux.org/cached/index/Hardware-hard_autres-clavier_multimedia.html Léa Linux How-To]

Indentify keys

  • Open a console
  • run xev (xbase-clients)

  • Search "keycode". in this example, it's 160

KeyPress event, serial 28, synthetic NO, window 0x2800001,
    root 0x5c, subw 0x0, time 3864774064, (-249,385), root:(429,410),
    state 0x0, keycode 160 (keysym 0x0, NoSymbol), same_screen YES,
    XLookupString gives 0 bytes:
    XmbLookupString gives 0 bytes:
    XFilterEvent returns: False

Try and note all multimedia keys

Keys naming

Here we're going use xmodmap to modify keymaps and insert our multimedia keys.

  • Create a new text file name ~/.xmodmaprc

  • This file is define like this:

keycode YOUR_KEYCODE = YOUR_NAME

Choose a name in /ur/share/X11/XKeysymDB. Note that xmodmap manual refer to /usr/lib/X11/XKeysymDB, but it's wrong on my Debian Etch open a bug ?

  • For example:

keycode 160 = XF86AudioMute
keycode 174 = XF86AudioLowerVolume
keycode 176 = XF86AudioRaiseVolume
keycode 162 = XF86AudioPlay
keycode 144 = XF86AudioPrev
keycode 145 = XF86AudioNext
keycode 164 = XF86AudioStop
keycode 237 = XF86HomePage
  • To apply that, run:

xmodmap ~/.xmodmaprc

Autostart for KDE

  • To load your change at startup, create a file ~/.kde/Autostart/xmodmap.sh:

xmodmap ~/.xmodmaprc
  • File must be executable

chmod +x ~/.kde/Autostart/xmodmap.sh

Assign action on your keys

Under KDE

Input Action

  • Go to

K > Configuration > Regional & Accessibility > Input Action
  • Create new group called "Multimedia"
  • Create new action

Global shortcut

In all application supporting DCOP calls, you can assign your multimedia as short key. It's a very powerful feature.

Example with Kmix:

  • Open K > Multimedia > Kmix sound mixer

  • Show Mixer Window
  • Go to Setting > Configure Global Shortcuts... 

Work in progress:


Translated versions :

  • ?FullSearchCached(##TranslationMasterPage:Keyboard/MultimediaKeys)