XBindKeys(1)

πŸ“¦
version 1.8.7 Β· 2 versions
, in debian bookworm, debian trixie, ubuntu jammy, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– XBindKeys πŸ’–

ok so bestie, welcome to XBindKeys(1) β€” the General Commands Manual page for a lil program that's lowkey a keyboard sorcerer. it lives in the X world and it's here to make your keys do things. buckle up πŸŽ€


✨ NAME ✨

xbindkeys β€” a grabbing keys program for X 🫢


✨ SYNOPSIS ✨

xbindkeys [ options ]

✨ DESCRIPTION ✨

okay so here's the tea: XbindKeys is a program that grabs key and mouse button events in X and then starts associated shell commands. that's it. that's the whole vibe. you press a thing, it runs a thing. main character energy fr fr πŸ’…


✨ COMMAND LINE OPTIONS ✨

the available command line options are literally as follows, no cap:

  • -d, --defaults β€” Print a default rc file πŸŽ€
  • -f, --file β€” Use an alternative rc file πŸ¦‹
  • -h, --help β€” Short help on options plus version/author info. (yes bestie, the receipts ✨)
  • -X, --display β€” Set X display to use 🌈
  • -v, --verbose β€” More information on xbindkeys when it runs πŸ‘€
  • -k, --key β€” Identify one key pressed (useful for configuration) πŸ”‘
  • -mk, --multikey β€” Identify multi key pressed (useful for configuration) πŸ”‘πŸ”‘
  • -g, --geometry β€” size and position of window with -k|-mk option πŸͺŸ
  • -n, --nodaemon β€” don't start as daemon πŸ™…β™€οΈ

and if guile support has not been disabled, you also get these two cuties:

  • -dg, --defaults-guile β€” Print a default guile configuration file 🧚
  • -fg, --file-guile β€” Use an alternative guile configuration file πŸ’œ

✨ XBINDKEYSRC ✨

the XBindKeys default configuration file is at $HOME/.xbindkeysrc, and it's used only for one user. very personal, very you πŸ’–

the configuration file consists of commands in double quotes, and associated keys in the next line. that's the whole format bestie, it's giving minimalism.

Comments are started with a pound (#) and extend to the end of the line. πŸ“

you can see a default configuration with --defaults ✨


✨ KEYSYMS ✨

so the program expects combinations of keysyms to be used by using plus (+) characters to combine them together. stacking keys like it's a fit check πŸ’…

the format of a command line is:

"command to start &"
   associated key

to specify an associated key, you can use xbindkeys --key or xbindkeys --multikey and put one of the two lines in the configuration file. literally just copy paste, iykyk πŸŽ€

a list of keys is in /usr/include/X11/keysym.h and in /usr/include/X11/keysymdef.h. the XK_ is not needed. πŸ™ˆ

List of modifiers:

Release, Control, Shift, Mod1 (Alt), Mod2 (NumLock),
Mod3 (CapsLock), Mod4, Mod5 (Scroll).

the release modifier is not a standard X modifier, but you can use it if you want to catch release events instead of press events. Modifiers are not case sensitive. ⭐

By defaults, xbindkeys does not pay attention to the modifiers NumLock, CapsLock and ScrollLock. Add the lines below in the configuration file if you want to pay attention to them. πŸ‘‘

keystate_numlock = enable
keystate_capslock = enable
keystate_scrolllock= enable
lowkey note that last one has no space before the =. that's not me being sloppy, that's the actual line. copy it exactly bestie 🫢

✨ EXAMPLES ✨

here's where it gets fun. feast your eyes πŸ˜­πŸ’–

# control+shift+q starts xterm
"xterm"
  control+shift + q

# Menu key starts xbindkeys_show
"xbindkeys_show"
  Menu

# Control + mouse button 1 starts xterm
"xterm"
  Control + b:1

# Control+Shift+a  release event starts rxvt
"rxvt"
  release+control+shift + a

# Control + mouse button 2 release event starts rxvt
"rxvt"
  Control + b:2 + Release

✨ SCHEME CONFIGURATION STYLE ✨

a scheme configuration can be used if guile support has not been disabled. the standard configuration is loaded only if the scheme configuration is not available. so it's like, scheme takes priority, periodt. 🧚

for more details, please see here:

http://www.gnu.org/software/guile/guile.html
Note: The guile configuration file is prefered for non trivial configurations, for example double click, timed click or key combinations. (yes "prefered" is spelled like that in the original, i'm not gonna fix it, that's not my job πŸ’…)

the default location is ~/.xbindkeysrc.scm 🌸

use xbindkeys --defaults-guile for more details. πŸ‘€

and xbindkeys --defaults-guile > ~/.xbindkeysrc.scm to use this method. πŸŽ€


✨ NOTE ✨

xbindkeys reloads the configuration file if modified. send a HUP signal to force reloading:

killall -HUP xbindkeys
when a HUP signal is sent to xbindkeys, changes take effect only after moving the mouse. yes bestie, you gotta wiggle the mouse. it's a whole ritual 🐭✨

✨ BUGS ✨

if you find a bug, please send mail to <xbindkeys-devel@nongnu.org> πŸ“§ (be nice, they're doing their best πŸ’œ)


✨ HOMEPAGE ✨

https://www.nongnu.org/xbindkeys/

✨ AUTHOR ✨

  • Philippe Brochard <hocwp@free.fr> πŸ‘‘
  • Marcello Mathias Herreshoff for guile support <marcello@hummer.stanford.edu> 🧚

✨ FILES ✨

  • $HOME/.xbindkeysrc β€” The users configuration file. πŸ’–
  • $HOME/.xbindkeysrc.scm β€” The users configuration file in scheme (if guile support has not been disabled). πŸ¦‹

✨ SEE ALSO ✨

  • xbindkeys_show β€” Utility for showing the actual keybinding with xbindkeys πŸ‘€
  • xmodmap(1x) β€” Utility for modifying keymap & button mappings in X. πŸ—ΊοΈ
  • xev(1x) β€” Print contents of X events. πŸ”
  • /usr/include/X11/keysymdef.h β€” X11 KeySym definitions. πŸ“š

and that's the whole page bestie!! this one's from the 3rd Berkeley Distribution, dated Tue Apr 19 2014, and it's XBindKeys(1) in the manual set. go forth and bind some keys, you absolute icon πŸ’…βœ¨πŸ’–