|
Size: 2970
Comment: Finished
|
Size: 3004
Comment: Various fixes.
|
| Deletions are marked like this. | Additions are marked like this. |
| Line 5: | Line 5: |
| To day, lot of keyboard have additional keys. Here, we show how to use them. This article is based on a part of this very good [http://www.lea-linux.org/cached/index/Hardware-hard_autres-clavier_multimedia.html Léa Linux How-To]. | Today, a lot of keyboards have additional keys. Here, we show how to use them. This article is based on part of the very good [http://www.lea-linux.org/cached/index/Hardware-hard_autres-clavier_multimedia.html Léa Linux How-To]. |
| Line 10: | Line 10: |
| = Indentify keys = | = Identify keys = |
| Line 12: | Line 12: |
| * run {{{xev}}} (DebPkg:xbase-clients) * Search "keycode". in this example, it's 160 {{{ |
* Run {{{xev}}} (DebPkg:xbase-clients) * Search "keycode". In this example, it's 160 {{{ |
| Line 22: | Line 21: |
| Try and note all multimedia keys | Try and note down all multimedia keys. |
| Line 24: | Line 23: |
| = Keys naming = Here we're going use {{{xmodmap}}} to modify keymaps and insert our multimedia keys. |
= Key naming = Here, we're going to use {{{xmodmap}}} to modify keymaps and insert our multimedia keys. |
| Line 27: | Line 26: |
| * Create a new text file name {{{~/.xmodmaprc}}} * This file is define like this: |
* Create a new text file: {{{~/.xmodmaprc}}} * The file uses this syntax: |
| Line 32: | Line 31: |
| 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 ?'' | Choose a name in {{{/usr/share/X11/XKeysymDB}}}. ''Note that xmodmap manual refer to /usr/'''lib'''/X11/XKeysymDB, but it's wrong on my Debian Etch open a bug ?'' |
| Line 51: | Line 50: |
| * To load your change at startup, create a file ~/.kde/Autostart/xmodmap.sh: | * To load your change at startup, create a ~/.kde/Autostart/xmodmap.sh file with the following contents: |
| Line 57: | Line 56: |
| * File must be executable | * This file must be executable: |
| Line 62: | Line 61: |
| = Assign action on your keys = | = Assign an action on your keys = |
| Line 65: | Line 64: |
| In all application supporting DCOP calls ''(KDE compatible)'', you can assign your multimedia keys as shortcuts. It's a very powerful and very simple feature ! | In all applications supporting DCOP calls ''(KDE compatible)'', you can assign your multimedia keys as shortcuts. It's a very powerful and very simple feature! |
| Line 73: | Line 72: |
| ''That's work fine with ["Amarok"] too.'' | ''This works fine with ["Amarok"] too.'' |
| Line 76: | Line 75: |
| This methode is more generic. | This method is more generic. |
Today, a lot of keyboards have additional keys. Here, we show how to use them. This article is based on part of the very good [http://www.lea-linux.org/cached/index/Hardware-hard_autres-clavier_multimedia.html Léa Linux How-To].
?TableOfContents(2)
Identify 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 down all multimedia keys.
Key naming
Here, we're going to use xmodmap to modify keymaps and insert our multimedia keys.
Create a new text file: ~/.xmodmaprc
- The file uses this syntax:
keycode YOUR_KEYCODE = YOUR_NAME
Choose a name in /usr/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 ~/.kde/Autostart/xmodmap.sh file with the following contents:
xmodmap ~/.xmodmaprc
- This file must be executable:
chmod +x ~/.kde/Autostart/xmodmap.sh
Assign an action on your keys
Under KDE
Global shortcut (Recommended)
In all applications supporting DCOP calls (KDE compatible), you can assign your multimedia keys as shortcuts. It's a very powerful and very simple feature!
Example with Kmix:
Open K > Multimedia > Kmix sound mixer
- Show Mixer Window
Go to Setting > Configure Global Shortcuts...
attachment:example-kde-kmix.png
This works fine with ["Amarok"] too.
Input Action
This method is more generic.
- Go to
K > Configuration > Regional & Accessibility > Input Action
- Create new group called "Multimedia"
- Create new action
KHotKey Daemon
Not tested
Under Gnome
Not tested
Translated versions :
?FullSearchCached(##TranslationMasterPage:Keyboard/MultimediaKeys)
