Termux Extra-Keys : Enhance Your Termux Experience with the Clear Key

codeniocodenio
2 min read

A Clear Key for a Better Termux Experience

Termux, a powerful Linux terminal emulator for Android, transforms your Android devices ( Phone, tablet, Android TV, etc ) into a versatile mobile development environment. With native Linux command-line capabilities, it's like having a fully-functional computer in your pocket—ideal for coding, server inspection, and learning Linux fundamentals wherever you go.

  • Learn Linux: explore commands, scripting, and core concepts on your phone
  • Quick reference: lookup commands and examples with built-in docs
  • Mobile learning: master Linux using just your Android device
  • Real practice: experiment with Linux operations and administration
  • Full environment: create a complete mobile Linux learning setup
  • Cloud sync: sync files with Google Drive for backup and access

The Extra-Keys Feature

Termux has extra-keys—customizable buttons above the keyboard [highlighted in red]. They give you quick access to common terminal functions.

The Problem

There's one annoyance: the lack of a dedicated clear screen key. using Ctrl+L or clear command on mobile, which requires extra tap interrupts your flow.

The Solution

Add a clear screen button to your toolbar:

# Open termux and create ./termux dir if not present
$ mkdir -p ~/.termux

# Create or edit the ./termux/termux.properties file
$ echo 'extra-keys = [ \
 ['ESC','|', '/', '~','HOME','UP','END'], \
 ['CTRL', 'TAB', '\u000C', '-','LEFT','DOWN','RIGHT'] \
]' > ~/.termux/termux.properties

# Apply changes
$ termux-reload-settings

The \u000C character creates a clear screen [empty space] button between TAB and - [highlighted in green].

Why This Matters

  • One tap to clear screen
  • Faster workflow on mobile
  • Better experience than typing commands

This small change makes Termux feel good and handy. Once you start customizing extra-keys, you'll want to add more shortcuts.

Happy terminal-ing! 📱💻

0
Subscribe to my newsletter

Read articles from codenio directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

codenio
codenio