Listing 1. Numeric Keypad Mapping
#
# The section re-maps the keypad keys so that they
# act as a VT-switcher: keypad 1 switches to VT 1,
# keypad 2 to VT 2, and so forth.
# Note that pressing Shift+key switches to a VT
# which is 10+ the number of the key
# (Shift+3 = VT 13) and that pressing Alt+key
# (when Num Lock is on) causes numeric output.
#
# Keypad number 7
#
keycode 71 = Console_7
shift keycode 71 = Console_17
alt keycode 71 = KP_7
alt control keycode 71 = Console_7
#
# Keypad number 8
#
keycode 72 = Console_8
shift keycode 72 = Console_18
alt keycode 72 = KP_8
alt control keycode 72 = Console_8
#
# Keypad number 9
#
keycode 73 = Console_9
shift keycode 73 = Console_19
alt keycode 73 = KP_9
alt control keycode 73 = Console_9
keycode 74 = KP_Subtract
#
# Keypad number 4
#
keycode 75 = Console_4
shift keycode 75 = Console_14
alt keycode 75 = KP_4
alt control keycode 75 = Console_4
#
# Keypad number 5
#
keycode 76 = Console_5
shift keycode 76 = Console_15
alt keycode 76 = KP_5
alt control keycode 76 = Console_5
#
# Keypad number 6
#
keycode 77 = Console_6
shift keycode 77 = Console_16
alt keycode 77 = KP_6
alt control keycode 77 = Console_6
keycode 78 = KP_Add
#
# Keypad number 1
#
keycode 79 = Console_1
shift keycode 79 = Console_11
alt keycode 79 = KP_1
alt control keycode 79 = Console_1
#
# Keypad number 2
#
keycode 80 = Console_2
shift keycode 80 = Console_12
alt keycode 80 = KP_2
alt control keycode 80 = Console_2
#
# Keypad number 3
#
keycode 81 = Console_3
shift keycode 81 = Console_13
alt keycode 81 = KP_3
alt control keycode 81 = Console_3
#
# Keypad number 0
#
keycode 82 = Last_Console
shift keycode 82 = Console_10
alt keycode 82 = KP_0
#
# Keypad '.' key
#
keycode 83 = KP_Period
alt control keycode 83 = Boot
control alt keycode 83 = Boot
keycode 84 = Last_Console
Copyright © 1994 - 2019 Linux Journal. All rights reserved.