Mail Archives: djgpp-workers/2001/06/12/09:38:33
> If you mean the values in trans_mapping_chras_at, then I simply don't
> understand them. If you do, perhaps you could explain; I tend to
> dislike any code I cannot understand ;-)
The comments in the example _inputrc provided by Bash explain the mapping:
# Translation characters for extended keys
# w/o SHIFT, CTRL, or ALT = "\e["
# w/ SHIFT = "\e[1"
# w/ CTRL = "\e[2"
# w/ ALT = "\e[3"
# then add for the key:
# "A" = Up Arrow
# "B" = Down Arrow
# "C" = Right Arrow
# "D" = Left Arrow
# "E" = Insert
# "F" = Delete
# "G" = Home
# "H" = End
# "I" = Page Up
# "J" = Page Down
# "XA" = F1, "XB" = F2, "XC" = F3, "XD" = F4, "XE" = F5, "XF" = F6
# "XG" = F7, "XH" = F8, "XI" = F9, "XJ" = F10, "XK" = F11, "XL" = F12
#
So the "up arrow" is encoded as:
\e[A
Shifted "up arrow":
\e[1A
Ctrl "up arrow":
\e[2A
etc.
- Raw text -