Skip to content

Instantly share code, notes, and snippets.

@grandchild
Created October 19, 2020 16:00
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 grandchild/6a89e0f126f8d14d13c31740156f1195 to your computer and use it in GitHub Desktop.
Save grandchild/6a89e0f126f8d14d13c31740156f1195 to your computer and use it in GitHub Desktop.
test_keys.zsh results
■ zsh test_keys.zsh
TERM=xterm
Wait for prompt before pressing each key.
Press SPACE to skip to the next key.
Don't press any key within 10 seconds to abort.
Ready [y/N]? y
Press Backspace
Press Delete
Press ControlLeft
key_info[ControlLeft]='^[[D' # was '^[[1;5D'
Press ControlRight
key_info[ControlRight]='^[[C' # was '^[[1;5C'
### Note: Unsure what "Meta" meant, pressed "Win+Left/+Right" here, because "Alt+Left/+Right" switches TTY.
Press MetaLeft
key_info[MetaLeft]='^C' # was '^[[1;3D'
Press MetaRight
key_info[MetaRight]='^C' # was '^[[1;3C'
### Note: Unsure what "BackTab" is -- pressed "Shift+Tab"
Press BackTab
key_info[BackTab]=' ' # was '^[[Z'
Press Left
key_info[Left]='^[[D' # was '^[OD'
Press Down
key_info[Down]='^[[B' # was '^[OB'
Press Right
key_info[Right]='^[[C' # was '^[OC'
Press Up
key_info[Up]='^[[A' # was '^[OA'
Press End
key_info[End]='^[[4~' # was '^[OF'
Press F1
key_info[F1]='^[[[A' # was '^[OP'
Press F2
key_info[F2]='^[[[B' # was '^[OQ'
Press F3
key_info[F3]='^[[[C' # was '^[OR'
Press F4
key_info[F4]='^[[[D' # was '^[OS'
Press F5
key_info[F5]='^[[[E' # was '^[[15~'
Press F6
Press F7
Press F8
Press F9
Press F10
Press F11
Press F12
Press Home
key_info[Home]='^[[1~' # was '^[OH'
Press Insert
Press PageDown
Press PageUp
❯ zsh test_keys.zsh
TERM=xterm
Wait for prompt before pressing each key.
Press SPACE to skip to the next key.
Don't press any key within 10 seconds to abort.
Ready [y/N]? y
Press Backspace
Press Delete
Press ControlLeft
key_info[ControlLeft]='^[Od' # was '^[[1;5D'
Press ControlRight
key_info[ControlRight]='^[Oc' # was '^[[1;5C'
### Note: Unsure what "Meta" meant, pressed "Alt+Left/+Right" here, because "Win+Left/+Right" switches workspaces for me.
Press MetaLeft
key_info[MetaLeft]='^[^[[D' # was '^[[1;3D'
Press MetaRight
key_info[MetaRight]='^[^[[C' # was '^[[1;3C'
### Note: Unsure what "BackTab" is -- pressed "Shift+Tab"
Press BackTab
Press Left
key_info[Left]='^[[D' # was '^[OD'
Press Down
key_info[Down]='^[[B' # was '^[OB'
Press Right
key_info[Right]='^[[C' # was '^[OC'
Press Up
key_info[Up]='^[[A' # was '^[OA'
Press End
key_info[End]='^[[8~' # was '^[OF'
Press F1
key_info[F1]='^[[11~' # was '^[OP'
Press F2
key_info[F2]='^[[12~' # was '^[OQ'
Press F3
key_info[F3]='^[[13~' # was '^[OR'
Press F4
key_info[F4]='^[[14~' # was '^[OS'
Press F5
Press F6
Press F7
Press F8
Press F9
Press F10
Press F11
Press F12
Press Home
key_info[Home]='^[[7~' # was '^[OH'
Press Insert
Press PageDown
Press PageUp
❯ zsh test_keys.zsh
TERM=xterm
Wait for prompt before pressing each key.
Press SPACE to skip to the next key.
Don't press any key within 10 seconds to abort.
Ready [y/N]? y
Press Backspace
key_info[Backspace]='^H' # was '^?'
Press Delete
Press ControlLeft
Press ControlRight
### Note: Unsure what "Meta" meant, pressed "Alt+Left/+Right" here, because "Win+Left/+Right" switches workspaces for me.
Press MetaLeft
Press MetaRight
### Note: Unsure what "BackTab" is -- pressed "Shift+Tab"
Press BackTab
Press Left
key_info[Left]='^[[D' # was '^[OD'
Press Down
key_info[Down]='^[[B' # was '^[OB'
Press Right
key_info[Right]='^[[C' # was '^[OC'
Press Up
key_info[Up]='^[[A' # was '^[OA'
Press End
key_info[End]='^[[F' # was '^[OF'
Press F1
Press F2
Press F3
Press F4
Press F5
Press F6
Press F7
Press F8
Press F9
Press F10
Press F11
Press F12
Press Home
key_info[Home]='^[[H' # was '^[OH'
Press Insert
Press PageDown
Press PageUp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment