Skip to content

Instantly share code, notes, and snippets.

@eggplants
Created February 9, 2020 01:18
Show Gist options
  • Save eggplants/ab749bf56cd9d02cc04a3cf7ba99d567 to your computer and use it in GitHub Desktop.
Save eggplants/ab749bf56cd9d02cc04a3cf7ba99d567 to your computer and use it in GitHub Desktop.
Use of keys like Alt, Ctrl, Esc is necessary for working with a CLI terminal. Termux touch keyboards do not include one. For that purpose Termux uses the Volume down button to emulate the Ctrl key. For example, pressing}Volume down+L on a touch keyboard sends the same input as pressing Ctrl+L on a hardware keyboard.
The result of using Ctrl in combination with a key depends on which program is used, but for many command line tools the following shortcuts works:
Ctrl+A → Move cursor to the beginning of line
Ctrl+C → Abort (send SIGINT to) current process
Ctrl+D → Logout of a terminal session
Ctrl+E → Move cursor to the end of line
Ctrl+K → Delete from cursor to the end of line
Ctrl+U → Delete from cursor to the beginning of line
Ctrl+L → Clear the terminal
Ctrl+Z → Suspend (send SIGTSTP to) current process
Ctrl+alt+C → Open new session (only work in Hacker's Keyboard)
The Volume up key also serves as a special key to produce certain input:
Volume Up+E → Escape key
Volume Up+T → Tab key
Volume Up+1 → F1 (and Volume Up+2 → F2, etc)
Volume Up+0 → F10
Volume Up+B → Alt+B, back a word when using readline
Volume Up+F → Alt+F, forward a word when using readline
Volume Up+X → Alt+X
Volume Up+W → Up arrow key
Volume Up+A → Left arrow key
Volume Up+S → Down arrow key
Volume Up+D → Right arrow key
Volume Up+L → | (the pipe character)
Volume Up+H → ~ (the tilde character)
Volume Up+U → _ (underscore)
Volume Up+P → Page Up
Volume Up+N → Page Down
Volume Up+. → Ctrl+\ (SIGQUIT)
Volume Up+V → Show the volume control
Volume Up+Q → Show extra keys view
Volume Up+K → Another variant to toggle extra keys view
@thearrival
Copy link

Thanks for sharing!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment