User Tools

Site Tools


ubuntu:keyboard:assign_a_keyboard_code_to_perform_an_action

Ubuntu - Keyboard - Assign a keyboard code to perform an action

Create or edit file ~/.xmodmap and populate with:

~/.xmodmap
keycode 67 = XF86Calculator

NOTE: This sets the F1 key to run the Calculator.

  • Determine keycodes by running
    xev

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

ubuntu/keyboard/assign_a_keyboard_code_to_perform_an_action.txt · Last modified: 2022/09/22 22:43 by peter

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki