Linux command
xbindkeys 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Start xbindkeys
xbindkeys
Generate default config file
xbindkeys --defaults > ~/.xbindkeysrc
Identify key codes interactively
xbindkeys -k
Identify multi-key combinations
xbindkeys -mk
Show current bindings
xbindkeys -s
Reload configuration
killall -HUP xbindkeys
Use specific config file
xbindkeys -f [~/.config/xbindkeysrc]
说明
xbindkeys binds keys or key combinations to shell commands in X11. It works independently of window managers, making it useful for global hotkeys including multimedia keys. Use `xbindkeys -k` to identify key names interactively. Press the desired key in the popup window to see its name and keycode. Configuration is read from ~/.xbindkeysrc by default. The daemon monitors the config file and reloads automatically when modified. Send SIGHUP to force reload. For complex setups, xbindkeys supports Guile Scheme configuration via ~/.xbindkeysrc.scm.
参数
- -d, --defaults
- Print default configuration to stdout.
- -f, --file _file_
- Use specified configuration file.
- -k, --key
- Identify a key (press key in window).
- -mk, --multikey
- Identify multi-key combination.
- -s, --show
- Show current key bindings.
- -n, --nodaemon
- Don't run as daemon.
- -v, --verbose
- Verbose mode.
- -h, --help
- Display help.
- -X, --display _display_
- Set X display to use.
- -g, --geometry _geometry_
- Set size and position of the key identification window (used with -k or -mk).
- -dg, --defaults-guile
- Print a default Guile configuration file to stdout.
- -fg, --file-guile _file_
- Use an alternative Guile configuration file.
- -V, --version
- Display version.
FAQ
What is the xbindkeys command used for?
xbindkeys binds keys or key combinations to shell commands in X11. It works independently of window managers, making it useful for global hotkeys including multimedia keys. Use `xbindkeys -k` to identify key names interactively. Press the desired key in the popup window to see its name and keycode. Configuration is read from ~/.xbindkeysrc by default. The daemon monitors the config file and reloads automatically when modified. Send SIGHUP to force reload. For complex setups, xbindkeys supports Guile Scheme configuration via ~/.xbindkeysrc.scm.
How do I run a basic xbindkeys example?
Run `xbindkeys` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -d, --defaults do in xbindkeys?
Print default configuration to stdout.