====== Ubuntu - Keyboard - Assign a keyboard code to perform an action ====== Create or edit file **~/.xmodmap** and populate with: keycode 67 = XF86Calculator **NOTE:** This sets the **F1** key to run the Calculator. * Determine keycodes by running xev * SEE these for a list of multimedia key symbols supported by XFree86. * https://wiki.sharewiz.net/doku.php?id=ubuntu:keyboard:xf86_keyboard_symbols * SEE https://wiki.linuxquestions.org/wiki/XF86_keyboard_symbols ---- ===== Enable the keybindings ===== xmodmap $HOME/.xmodmap ---- ===== Test ===== Press **F1**. This should start the calculator. ---- ===== To make permanent ===== Put /usr/bin/xmodemap and $Home/.xmodmap into .xinitrc or .xprofile. ---- ==== References ==== https://wiki.linuxquestions.org/wiki/XF86_keyboard_symbols https://www.cl.cam.ac.uk/~mgk25/ucs/keysymdef.h https://wiki.linuxquestions.org/wiki/Configuring_keyboards https://wiki.linuxquestions.org/wiki/List_of_keysyms https://wiki.linuxquestions.org/wiki/List_of_Keysyms_Recognised_by_Xmodmap