Difference between revisions of "Multimedia Keys"

From Free Knowledge Base- The DUCK Project: information for everyone
Jump to: navigation, search
(MythTV)
Line 5: Line 5:
 
=== Media Keys Under Linux ===
 
=== Media Keys Under Linux ===
  
 +
Some common multimedia key examples with common scancodes
 +
172    Play / Pause
 +
174    Stop
 +
056    Back (Rewind)
 +
041    Forward
 +
173    Last track
 +
171    Next track
 +
121    Mute
 +
122    Volume up
 +
123    Volume down
 +
 +
Scancode may vary from keyboard manufacturer.  Other keys can be mapped using xev.
 +
 +
==== Ubuntu ====
 
In Ubuntu 5.10 (Breezy Badger), Ubuntu 5.04 (Hoary Hedgehog) and later Ubuntu versions, please go to System menu -> Preferences -> Keyboard Shortcuts to find the keyboard shortcut editor.  For Kubuntu, see [https://wiki.kubuntu.org/KDEMultimediaKeys KDEMultimediaKeys]. For Xubuntu, see [https://help.ubuntu.com/community/XfceMultimediaKeys XfceMultimediaKeys].  
 
In Ubuntu 5.10 (Breezy Badger), Ubuntu 5.04 (Hoary Hedgehog) and later Ubuntu versions, please go to System menu -> Preferences -> Keyboard Shortcuts to find the keyboard shortcut editor.  For Kubuntu, see [https://wiki.kubuntu.org/KDEMultimediaKeys KDEMultimediaKeys]. For Xubuntu, see [https://help.ubuntu.com/community/XfceMultimediaKeys XfceMultimediaKeys].  
  
Line 12: Line 26:
 
detect keys from the multimedia keyboard
 
detect keys from the multimedia keyboard
  
Another laternative: [https://www.howtoforge.com/linux_multimedia_keyboard Xbindkeys] is a program that allows you to launch shell commands with your keyboard or your mouse under X Window. It links commands to keys or mouse buttons, using its configuration file. It does not depend on the window manager and can capture all keyboard keys.
+
Another alternative: [https://www.howtoforge.com/linux_multimedia_keyboard Xbindkeys] is a program that allows you to launch shell commands with your keyboard or your mouse under X Window. It links commands to keys or mouse buttons, using its configuration file. It does not depend on the window manager and can capture all keyboard keys.
  
 
  apt-get install xbindkeys
 
  apt-get install xbindkeys
  
=== MythTV ===
+
==== Kubuntu ====
 +
 
 +
The volume up and volume down are intercepted.  They display a screen overlay with vol up and down position.  The scancode IS reported by xev as a KeyRelease event but not as a KeymapNotify event.
 +
 
 +
==== MythTV ====
  
 
To get multimedia keyboards or remotes with media keys to work in MythTV you first have to get them recognized with Xfce under Linux.   
 
To get multimedia keyboards or remotes with media keys to work in MythTV you first have to get them recognized with Xfce under Linux.   

Revision as of 17:59, 26 February 2015

Many keyboards include some special keys (also called hotkeys or multimedia keys), which are supposed to execute an application. These keys are known by some different terms such as Multimedia Internet Keyboard Buttons. These keyboards have special keys used to access the Internet, music, and other frequently used programs such as email. A typical example contains buttons that control various computer processes, such as turning on the computer's power, putting the CPU to sleep, and waking it up again.

Multimedia keyboards designed for use with Microsoft Windows typically come already programmed, ready to use right out of the box.

Media Keys Under Linux

Some common multimedia key examples with common scancodes

172    Play / Pause
174    Stop
056    Back (Rewind)
041    Forward 
173    Last track
171    Next track
121    Mute
122    Volume up
123    Volume down

Scancode may vary from keyboard manufacturer. Other keys can be mapped using xev.

Ubuntu

In Ubuntu 5.10 (Breezy Badger), Ubuntu 5.04 (Hoary Hedgehog) and later Ubuntu versions, please go to System menu -> Preferences -> Keyboard Shortcuts to find the keyboard shortcut editor. For Kubuntu, see KDEMultimediaKeys. For Xubuntu, see XfceMultimediaKeys.

GNOME directly queries X11 for its media keys support, so you don't need to manually configure it. However, Xfce doesn't, and you'll have to manually get the keycodes and set the symlinks.

showkey -k

detect keys from the multimedia keyboard

Another alternative: Xbindkeys is a program that allows you to launch shell commands with your keyboard or your mouse under X Window. It links commands to keys or mouse buttons, using its configuration file. It does not depend on the window manager and can capture all keyboard keys.

apt-get install xbindkeys

Kubuntu

The volume up and volume down are intercepted. They display a screen overlay with vol up and down position. The scancode IS reported by xev as a KeyRelease event but not as a KeymapNotify event.

MythTV

To get multimedia keyboards or remotes with media keys to work in MythTV you first have to get them recognized with Xfce under Linux.

"...disabling "Launch Gnome Services at Startup" on the Startup Settings-Advanced Page within Mythbuntu. Now play generates keypress events. I was surprised that disabling xfce4-volumed wasn't enough, but at least its resolved."

"...mythcontrols is a simple plugin that allows you to edit all of your keybindings."

"you should just use xfce keyboard settings (on xfce4-settings-manager) to customise your keymap choices. [...] xfce4's DE/WM should take care of any reason for having to customise .Xmodmap, generally speaking. [...] DE/WM are Desktop-Environment (XFCE4) / Window-Manager (xfwm4), is an example. "