0% found this document useful (0 votes)
76 views

Termux Shortcut Key

The document discusses keyboard shortcuts and input methods for the Termux terminal emulator on Android. It describes how volume buttons emulate keyboard keys and an extra keys row that can be configured. It also covers a text input view for touch keyboard features.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
76 views

Termux Shortcut Key

The document discusses keyboard shortcuts and input methods for the Termux terminal emulator on Android. It describes how volume buttons emulate keyboard keys and an extra keys row that can be configured. It also covers a text input view for touch keyboard features.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 3

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 <code>Volume
down+L</code> on a touch keyboard sends the same input as pressing
<code>Ctrl+L</code> 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+W''' → Clear prompt before word (a word is a set of characters after a
space)
* '''Ctrl+alt+C''' → Open new session (only works 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''' → &#124; (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

= Extra Keys Row =


Termux also has an extra keys view which allows you to extend your current
keyboard. To enable the extra keys view you have to long tap on the keyboard button
in the left drawer menu. You can also press Volume Up+Q or Volume Up+K.

After Termux v0.66 extra keys row became configurable through file
"~/.termux/termux.properties". If this file does not exist, you will need to create
it.

After editing Termux.properties file, you need to reload Termux configuration by


executing command "termux-reload-settings".

The setting extra-keys-style can be used to choose which set of symbols to use for
the keys. Valid options are "default," "arrows-only", "arrows-all", "all" and
"none".
extra-keys-style = default

Example configuration to enable 2-row (was in v0.65) extra keys:

extra-keys = [['ESC','/','-','HOME','UP','END','PGUP'],
['TAB','CTRL','ALT','LEFT','DOWN','RIGHT','PGDN']]

The extra-keys definition itself can also be spread over multiple lines, if
desired, by
"backslash-escaping" the line feed at the end of each line, thus:

extra-keys = [ \
['ESC','|','/','HOME','UP','END','PGUP','DEL'], \
['TAB','CTRL','ALT','LEFT','DOWN','RIGHT','PGDN','BKSP'] \
]

[[File:extra_keys_view.png|border|400px]]

== Supported keys ==

Each key "entry" can be either a string (such as <code>'|'</code>, <code>'/'</code>


or <code>'='</code>) or one of the values listed below. These values are defined in
ExtraKeysView.java, and the list of values (not including possible synonyms) is:

* CTRL ("special key")


* ALT ("special key")
* FN ("special key")
* SPACE
* ESC
* TAB
* HOME
* END
* PGUP
* PGDN
* INS
* DEL
* BKSP
* UP
* LEFT
* RIGHT
* DOWN
* ENTER
* BACKSLASH
* QUOTE
* APOSTROPHE
* F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12
* KEYBOARD (Hide the keyboard)
* DRAWER (Open app drawer)

Each of the three "special keys" listed above should only be listed at most ONCE in
the extra-keys definition i.e. do NOT have more than one CTRL key. Having
more than one instance of any "special key" will result in a bug whereby those keys
do not function correctly.

A note about backslash: this character has special meaning and you shouldn't use it
directly to
define a key. Use 'BACKSLASH' instead, otherwise properly escape it -
<code>'\\\\'</code>.
== Advanced extra keys configuration ==

In Termux v0.95 extra keys configuration was extended with configurable popups.
Popups keys can be triggered by swiping up on the respective keys.

Here is a syntax for key definition with popup:

{key: KEY, popup: POPUP_KEY}

and here is a syntax for a more advanced key:

{key: KEY, popup: {macro: 'KEY COMBINATION', display: 'Key combo'}}

Example of advanced extra keys configuration:


<pre>
extra-keys = [[ \
{key: ESC, popup: {macro: "CTRL f d", display: "tmux exit"}}, \
{key: CTRL, popup: {macro: "CTRL f BKSP", display: "tmux ←"}}, \
{key: ALT, popup: {macro: "CTRL f TAB", display: "tmux →"}}, \
{key: TAB, popup: {macro: "ALT a", display: A-a}}, \
{key: LEFT, popup: HOME}, \
{key: DOWN, popup: PGDN}, \
{key: UP, popup: PGUP}, \
{key: RIGHT, popup: END}, \
{macro: "ALT j", display: A-j, popup: {macro: "ALT g", display: A-g}}, \
{key: KEYBOARD, popup: {macro: "CTRL d", display: exit}} \
]]
</pre>

= Text Input View =


Terminal emulators usually do not support the advanced features of touch keyboards
like autocorrect, prediction and swipe typing. To solve this, Termux has a text
input view. Text entered in it will get pasted to the terminal. Because it's a
native Android text input view, all touch keyboard features will work. To access
the text input view you have to swipe the extra keys view to the left.

[[File:text_input_view.png|border|400px]]

= See Also =
* [[Hardware Keyboard]]
* [[Hardware Mouse]]

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy