Skip to content

Instantly share code, notes, and snippets.

@MarcusE1W
Created September 13, 2017 21:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MarcusE1W/a27db31fe9fb1917b2683cc549ea2dfb to your computer and use it in GitHub Desktop.
Save MarcusE1W/a27db31fe9fb1917b2683cc549ea2dfb to your computer and use it in GitHub Desktop.
Linux console key mapping for micro
# The following is a map with supplemental key mappings for the linux console.
# Using these mappings will allow distinction between key presses for several
# keys with and without control and shift modifiers.
# These mappings can be loaded with the loadkeys(1) program. Simply run
# loadkeys supplemental.kmap
# as root to add these mappings to your console. How to make these changes
# permanent depends on your distribution. There are also two ways to make these
# changes permanent: create a keymap which contains this file, or add a job
# which is run on startup and executes the above loadkeys command.
# Debian (or Debian based such as Ubuntu):
# Add the contents of this file to /etc/console-setup/remap.inc and run
# "dpkg-reconfigure -u keyboard-configuration" as root. Adding the mappings
# to the remap.inc file will ensure that the mappings are activated, even if
# another keyboard layout is chosen at a later time.
# Right
control keycode 106 = F100
shift keycode 106 = F101
control shift keycode 106 = F102
# Left
control keycode 105 = F103
shift keycode 105 = F104
control shift keycode 105 = F105
# Up
shift keycode 103 = F106
# Down
shift keycode 108 = F107
string F100 = "\033[1;5C"
string F101 = "\033[1;2C"
string F102 = "\033[1;6C"
string F103 = "\033[1;5D"
string F104 = "\033[1;2D"
string F105 = "\033[1;6D"
string F106 = "\033[1;2A"
string F107 = "\033[1;2B"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment