Difference between revisions of "Linux Tools to Remap Keys and Mouse Buttons"

From Free Knowledge Base- The DUCK Project: information for everyone
Jump to: navigation, search
(Created page with "Various facilities available: * xbindKeys - a program that grab keys and mouse button events in X and starts associated shell command. This is to make a key press do somethin...")
 
Line 5: Line 5:
 
* xfce4-keyboard-settings - a graphical front-end in Xfce with an "Applications Shortcut" facility for mapping keys to various functions similar to xbindkeys-config, but not using xbindKeys.
 
* xfce4-keyboard-settings - a graphical front-end in Xfce with an "Applications Shortcut" facility for mapping keys to various functions similar to xbindkeys-config, but not using xbindKeys.
 
* xinput - a utility to list available input devices, query information about a device and change input device settings.  
 
* xinput - a utility to list available input devices, query information about a device and change input device settings.  
 +
* xkb - The Xorg XKB replaces xmodmap and more.  It is new.
  
 +
=== xkb ===
 +
The X KeyBoard extension, otherwise known as xkb, is does the mapping of physical keys to their proper function.  The kernel manages console keyboard input, and in X it's managed by xkb, X Keyboard. xkb controls keymapping, keyboard models, and layouts. 
  
 +
xkb symbol files can be found in /usr/share/X11/xkb/symbols and the modifier keys are mapped in /usr/share/X11/xkb/symbols/pc
  
  
 +
Example: Disable CAPS LOCK and make it so you can toggle the caps lock state by pressing both shift keys at the same time.  Type the following at console:
 +
setxkbmap -option "caps:none"
 +
setxkbmap -option "shift:both_capslock"
 +
 +
External resources:
 +
* [http://madduck.net/docs/extending-xkb/ Extending the X keyboard map with xkb]
 +
* [http://www.x.org/releases/current/doc/xorg-docs/input/XKB-Config.html The XKB Configuration Guide]
 +
* [http://www.charvolant.org/~doug/xkb/ An Unreliable Guide to XKB Configuration]
 +
* [http://www.pixelbeat.org/docs/xkb_remap/ XKB keyboard remapping]
 +
* [http://www.linux.com/learn/tutorials/769644-hacking-your-linux-keyboard-with-xkb Hacking Your Linux Keyboard with xkb: Linux.com]
 +
 +
keyword: XKeyboardConfig
 
[[Category:Computer_Technology]]
 
[[Category:Computer_Technology]]
 
[[Category:Linux]]
 
[[Category:Linux]]
 
[[Category:Ubuntu]]
 
[[Category:Ubuntu]]
 
[[Category:MythTV]]
 
[[Category:MythTV]]

Revision as of 16:45, 28 February 2015

Various facilities available:

  • xbindKeys - a program that grab keys and mouse button events in X and starts associated shell command. This is to make a key press do something, such as start a program.
  • xbindkeys-config - a graphical front-end to xbindkeys.
  • xmodmap - a program which remaps keys to various functions. xmodmap is a utility for modifying keymaps and pointer button mappings in Xorg. Use this to make a key press act as another key press. As of 2013, Ubuntu and derivatives no longer use xmodmap, but instead use xkb.
  • xfce4-keyboard-settings - a graphical front-end in Xfce with an "Applications Shortcut" facility for mapping keys to various functions similar to xbindkeys-config, but not using xbindKeys.
  • xinput - a utility to list available input devices, query information about a device and change input device settings.
  • xkb - The Xorg XKB replaces xmodmap and more. It is new.

xkb

The X KeyBoard extension, otherwise known as xkb, is does the mapping of physical keys to their proper function. The kernel manages console keyboard input, and in X it's managed by xkb, X Keyboard. xkb controls keymapping, keyboard models, and layouts.

xkb symbol files can be found in /usr/share/X11/xkb/symbols and the modifier keys are mapped in /usr/share/X11/xkb/symbols/pc


Example: Disable CAPS LOCK and make it so you can toggle the caps lock state by pressing both shift keys at the same time. Type the following at console:

setxkbmap -option "caps:none"
setxkbmap -option "shift:both_capslock"

External resources:

keyword: XKeyboardConfig