Note: this wiki is no longer maintained. If you have any questions related to this wiki, please post them on the CrunchBang forums.

Translations of this page?:

KEYBOARD Xev - Determine custom keybindings

Xev is a command that displays X events (input actions such as mouse or keyboard). This information is commonly used to determine the keybinding name of keyboard custom keys such as the volume or email shortcut buttons.

Install

for installation help, follow this guide.

sudo apt-get install xev
Use to determine keybinding name
1. Launch terminal.
2. Run 'xev' command.
3. Hit the button you want to know the keybinding of.
4. Read the output.
Example output (after hitting volume up key on my keyboard):

CodeKeyPress event, serial 35, synthetic NO, window 0x2400001, root 0x1a7, subw 0x0, time 9065053, (28,3), root:(1067,615), state 0x10, keycode 123 (keysym 0x1008ff13, XF86AudioRaiseVolume), same_screen YES, XLookupString gives 0 bytes: XmbLookupString gives 0 bytes: XFilterEvent returns: False

KeyRelease event, serial 35, synthetic NO, window 0x2400001, root 0x1a7, subw 0x0, time 9065190, (28,3), root:(1067,615), state 0x10, keycode 123 (keysym 0x1008ff13, XF86AudioRaiseVolume), same_screen YES, XLookupString gives 0 bytes: XFilterEvent returns: False Text

  • XF86AudioRaiseVolume is the keybinding for the volume up key on my keyboard.
  • The two paragraghs of output seem identical, but one is for when the key is pressed, and the other is for when it's released. For general purposes just pick either one and ignore the other.
  • Also, the keycode can be useful, but for rc.xml that's not what we're looking for here.
Simpler example (F5 key):

KeyPress event, serial 35, synthetic NO, window 0x2400001, root 0x1a7, subw 0x0, time 10722202, (7,3), root:(1046,615), state 0x10, keycode 71 (keysym 0xffc2, F5), same_screen YES, XLookupString gives 0 bytes: XmbLookupString gives 0 bytes: XFilterEvent returns: False

The keybinding for F5 is F5.

 
xev-determine_custom_keybindings.txt · Last modified: 2012/05/25 18:43 by machinebacon
Except where otherwise noted, content on this wiki is licensed under the following license:CC Attribution-Share Alike 3.0 Unported

Powered by DokuWiki. Hosted by Linode.
Copyright © 2010 CrunchBang Linux.
Proudly powered by Debian GNU/Linux.
Debian is a registered trademark of Software in the Public Interest, Inc.