Skip to content

Instantly share code, notes, and snippets.

@iacchus
Created June 21, 2023 17:06
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 iacchus/d4310d9858215c2a9d216dade8888144 to your computer and use it in GitHub Desktop.
Save iacchus/d4310d9858215c2a9d216dade8888144 to your computer and use it in GitHub Desktop.
Termux keyboard
## Configuration with additional popup keys (swipe up from an extra key)
extra-keys = [[ \
{key: KEYBOARD, popup: {macro: "CTRL d", display: exit}}, \
{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 →"}}, \
{macro: "ALT c", display: "cd", popup: {macro: "ALT g", display: A-g}}, \
{macro: "vim SPACE $(fzf) ENTER", display: "vim", popup: {macro: "ALT g", display: A-g}}, \
{macro: "ESC :w ENTER", display: ":w", popup: {macro: "ALT g", display: A-g}}, \
{macro: "ESC :q ENTER", display: ":q", popup: {macro: "ALT g", display: A-g}}, \
{macro: 'y :%s/ CTRL r " //gi LEFT LEFT LEFT', display: ":%s", \
popup: {macro: 'y :%s/ CTRL r " //gic LEFT LEFT LEFT LEFT', display: ':%s gic'}}, \
{macro: "CTRL c", display: "<C-c>", popup: {macro: "ALT g", display: A-g}}, \
{macro: "CTRL d", display: "<C-d>", popup: {macro: "ALT g", display: A-g}}, \
{macro: "!$", display: "!$", popup: {macro: "ALT g", display: A-g}}, \
{macro: "/", display: "/", popup: {macro: '"sy / CTRL r s ENTER', display: "search selection"}}, \
{key: ENTER}, \
{key: LEFT, popup: {macro: "ESC 0", display: "<ESC>0"}}, \
{key: DOWN, popup: {macro: "CTRL d", display: "<C-d>"}}, \
{key: UP, popup: {macro: "CTRL u", display: "<C-u>"}}, \
{key: RIGHT, popup: {macro: "ESC $", display: "<ESC>$"}}, \
{key: TAB, popup: {macro: "ALT a", display: A-a}} \
]]
@iacchus
Copy link
Author

iacchus commented Jun 21, 2023

This goes to ~/.termux/termux.properties.

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