Enable the Calculator Keyboard Button
Many keyboards have a dedicated Calculator button. The following steps show how to enable that button, by using xbindkeys.
0. Install xbindkeys
If xbindkeys
is not already installed, install it. Then create a new default configuration file:
$ sudo pacman -S xbindkeys
$ xbindkeys --defaults > ~/.xbindkeysrc
NOTE: The default ~/.xbindkeysrc
enables some example key bindings, which you will probably want to comment out.
1. Map the key to a command
Edit ~/.xbindkeysrc
to assign a command to the XF86Calculator
button:
"/usr/bin/galculator"
XF86Calculator
2. Start xbindkeys
Start xbindkeys
by running:
$ xbindkeys
To ensure xbindkeys
runs on startup, add it to your session autostart configuration, or include it in your .xinitrc
or .xprofile
file with:
xbindkeys &
X. Troubleshooting
Changes to ~/.xbindkeysrc
should be automatically applied (or at least, fixed with a reboot). If you don't want to reboot, try restarting your X session, and/or killing xbindkeys (forcing it to restart):
$ killall -HUP xbindkeys