According to Archlinux wiki and How Keys Are Turned Into Actions , here comes how keystroke information is transferred in computer.
- Keyboard send scancode to computer
- Linux kernel convert scancode to keycode
- Keyboard layout convert keycode to symbol/keysym
- Linux terminal convert keysym into ASCII sequences
- Ordinary key, like "a", "b". we should use them to input text
- Special keys, which you would use to tell xterm to perform some action. They could not be to used to input text. They will generate escape sequences.
- "\e[1~": beginning-of-line # Home Key
- "\e[4~": end-of-line # End Key
- "\e[3~": delete-char # Delete Key
- "\e\e[C": forward-word # Alt-Right
No comments:
Post a Comment