Termux-app: Add overlay keyboard with Alt, Ctrl, Tab, arrow keys (and a few more keys) #97

Created on 9 Nov 2015  Â·  56Comments  Â·  Source: termux/termux-app

Hi

It will be good if there be any UI for changing cursor in Termux. It's very annoying to press vol button for simulating ctrl key for changing direction (if you have worked with nano you know what I'm saying).

Or it can be simple direction arrow in app or Termux be able to change cursor position on touch.

thank you.

enhancement extra keys row

Most helpful comment

There will probably be something like the JuiceSSH overlay keyboard added soon!

juicessh-keyboard

All 56 comments

Thanks for the suggestion! There will probably be some kind of optional overlay on the keyboard with additional keys (arrow keys, ctrl/alt/etc, perhaps configurable) like there is in ConnectBot and JuiceSSH in the future! Leaving this issue open to track that.

Thank you @fornwall

There will probably be something like the JuiceSSH overlay keyboard added soon!

juicessh-keyboard

please make this optional, I really like the volumekey solution

@franciscod Yes - the plan is to make the overlay keyboard optional - I like the volume key solution too on my phone :).

+1

Any news on this?

Have you tried using Hacker's Keyboard?

@fornwall any updates on this?

Problem with using Hacker's Keyboard is having to change keyboard all the time.

Protip: For the time being you can enable arrow keys in Swiftkey, which makes it much more usable with Termux

A simple tweak that would help immensely would be to enable the "chrome address bar" keyboard hint, which puts a "/" in place of the "," key.

I switch keyboard modes to hit / quite often in termux.

Here's the keyboard hint:
http://developer.android.com/reference/android/widget/TextView.html#attr_android:inputType

textUri:
Text that will be used as a URI. Corresponds to TYPE_CLASS_TEXT | TYPE_TEXT_VARIATION_URI.

This was added in version 0.35 recently. It can be enabled with VolumeUp+Q or long pressing the keyboard button in the left drawer menu.

I am leaving this open, because it doesn't have Arrow Keys yet, which seems quite important for OP.

The current implementation of the ExtraKeys seems very flexible right? That's what I understand from reading the code. It should be possible to make this completely customizable in the termux.properties file because the buttons are just a String array here. Of course the button events have to be catched properly but that shouldn't be a big problem.

@toXel Yes - the plan is to make it configurable shortly!

Sorry for delay :)
+1
It is now more interesting than before.

Couldn't find that tip anywhere else on long-pressing the "Keyboard" button in the drawer to toggle the special keys, so I'm commenting here in the hope it gets better documented or I make it more googleable with a wall of relevant text. It was really useful for me because I'm using a hardware keyboard and the Null Keyboard app to stop the system soft keyboard displaying. Even though the Termux special keys dissapear after a second or so when ALT+tabbing back into the app it caused 2 screen resize events which was really annoying in fullscreen terminal apps like tmux - sometimes even, the second resize event wouldn't be honoured, leaving the screen in some weird half resized state :( Anyway, now I can ALT+tab all I want and termux will always looks exactly how I left it :)

I'm definately looking forward to more keys in the overlay, especially the arrow keys I miss.

The discussion on it seems to have started again. I too am in favour to add arrow keys.

There's also a very recent discussion going on here:

https://plus.google.com/114363412663838875988/posts/UkcuMFArGRr

open SSH in termux then connect it with juicessh
then you will not need termux's keyboard any more.

Yea....arrow keys...need them
Not sure how to use without: (

Please consider the possibility of associating multiple keys with a single button when implementing configurable buttons. For example, I tend to use Ctrl-c very often and would like to configure a single button for that. I think many people would benefit from that too. Thanks.

You can use the Volume-Down button as Ctrl; I never found Ctrl-C annoying to press with that combo.

You can use the Volume-Down button as Ctrl; I never found Ctrl-C annoying to press with that combo.

I'm aware of the volume-down as ctrl, but I don't find comfortable to
press volume buttons in this context. You are right, it's not really
annoying, just less comfortable.

mengyyy: "... the connect it with juicessh"
How?
I entered ssh at the prompt and got instructions to install openssh.
did that. now when I say ssh it runs openssh.
Now what? Thanks.

I haven't used it, myself, but I think they were talking about connecting to that ssh server from this app:
https://play.google.com/store/apps/details?id=com.sonelli.juicessh

(I connect from a computer with a full keyboard, but haven't really needed to connect from another app, yet.)

Instructions for the server are on the lower half of the "using SSH" section of the help pages: https://termux.com/ssh.html

The overlay keyboard on JuiceSSH is so clearly superior for many users. Rather than hacks to get the Termux environment running inside JuiceSSH, I'm sure a lot of developers would really appreciate this being added to Termux -- configurable, of course, so as not to alienate users who like the existing kludge.

Is this something the Termux developers are seriously considering? Or does this Issue mainly function as a place for folks like me and others to keep asking?

There's a less convoluted way of getting a keyboard that works like juice's:
https://f-droid.org/app/org.pocketworkstation.pckeyboard

It's not identical to juice, but it's got the same basic things, and it's easy to switch to in termux. Might be a good stop-gap.

Or maybe it is possible to have something like two finger scroll gesture that controls the cursor (both horizontally and vertically). So it won't cost screen real estate but is quickly accessible.

shift would also be nice

Which file has the code to Ctrl+Q invocation? I would like to take a closer look at the source code for this issue. Which files have the code to this issue we are discussing?

Can this just copy the JuiceSSH overlay 100%? That one works really super well.

One more vote for two-finger gestures to control arrow key functions.

Links to source code in question? With please added this time, in this recurring request in this thread. Maybe we can get what we want, keyboard on device in Termux.

+1 for customizable keys (I need it for Esc, Ctrl, {, }) and gestures handling (I'm using it for Tab key, arrows and PgUp, PgDn, Home, End). Actually, I have switched to Termius app for now as it has this features and allows me to use hardware keyboard (Samsung Galaxy Keyboard Cover). With some help of gestures it works great! But I'm missing whole Termux environment (access to local storage etc.), so it would be great to switch back to Termux ;)

@sdrausty app/src/main/java/com/termux/app/TermuxKeyListener.java has the Ctrl+Q handling, https://github.com/termux/termux-app/commit/d72fd579eea1c7d0bdcab0625d214b0a58d6d1c5 and commits leading up to it built the extra keys view. (That commit introduced Ctrl+Q, I believe.)

Cool. Thanks.

+1 for configurable keyboard overlay.

What's the current update on arrow keys?

Hacker's Keyboard is too congested for my choice. I'm using GBoard with PC layout.

I am using hackers keyboard but still have to use the overlay because the esc btn is hidden under fn.. overlay customization would be great, something like an rc file for it maybe?

Please add arrow keys to Extra Keys Row, or make the row configurable.

@agguser

add arrow keys to Extra Keys Row

Using a touch keyboard at https://termux.com/touch-keyboard has
• Volume Up+Q → Show extra keys view

make the row configurable

This part is being developed. See https://raw.githubusercontent.com/termux/termux-app/master/app/src/main/java/com/termux/app/ExtraKeysView.java and https://github.com/termux/termux-app/commit/d72fd579eea1c7d0bdcab0625d214b0a58d6d1c5

Hello Sdrausty, this works super. The extra keys stay on top of the keyboard. Work with emacs a lot and when no external keyboard is attached, the volume up+Q method works great. In terminal mode, the up and down key are used too to browse the former commands, can they be added too? there is some room left :-) Thanks for this great addition!
Benny

On my old smartphone the volume keys are broken because I use termux very intensive.
I use this keyboard APP wich has arrow keys:
https://play.google.com/store/apps/details?id=nextapp.inputmethod.latin
But it is not very accurate...

Hi Benny. Surprising this pull request, "add some func keys" isn't referenced here. @neo-expert is the source code available for the app you mention.

codeboard

Coding on your mobile device just got easier. No more switching between numbers, symbols and alphabets.

Features:

  • Cut, copy, paste, select all
  • Tab
  • All the braces {[<(
  • ; / \ ! | &$ etc
  • No ads or IAP, made for students!

*From https://github.com/gazlaws-dev/codeboard

+1 on this. I can see that the overlay has been released, but it is lacking the arrow keys. Gboard has cursor tools built in now which give you arrow keys, but Termux loads a slimmed down version of Gboard without the arrow key options. I have Hacker's Keyboard installed, but it is really clunky to type on compared to Gboard, and I'd rather not switch to it just to get arrow keys. This really should be a high priority.

Is there any chance we could get horizontal scrolling via touch? It's great to be able to quickly move up and down withh touch, but moving left and right to edit text is always frustrating. As far as I can tell swiping left and right does not do anything at the moment.

The current overlay keyboard is not perferct, but quite good. The problem is that it's very hard to find it without Googling. I think it should be turned on by default, or at least should be easier to be found.

Why is that that difficult to use arrow keys in termux? I am still using an special keyboard app that offers the arrow keys. Unfortunately Gboard does not have these.

From @agguser comment I thought I already have this installed on my phone. But then noticed there haven't been a release since January.

Is there something wrong?

What about | and fn?

"|" is on the "–" one must long press then go up...
This should really be customizable (not everybody wants two lines, could choose the positions, etc) or at least have a small tutorial somewhere when the app is installed.

The extra keys are not obvious to activate either, long press on the "Keyboard" button in the side menu activatable with left-swiping ? Nobody would guess those two moves.

Updated to 0.63 but on my phone this overlay is one row with double the height, I've installed it on another phone and it works fine.

| | My phone | Another phone |
| -------------: |:-------------| :-----|
| Model | Redmi Note 2 | Redmi 3A |
| Android Version | 5.0 | 6.0 |
| ROM | MIUI | MIUI |
| Installation | Updated (Google Play) | Installed (Google Play) |
| Termux version | 0.63 | 0.63 |
| Google Play channel | Beta | Stable |
| Scr | Screenshot Redmi Note 2
Full size | Screenshot Redmi 3A
Full size |
| Res | 1080p | 720p |

How can I disable this? I don't have a navbar and I find it impossible to disable this feature that takes up screen real estate.

Edit: found how to disable it, it's Volume Up (on phone) + Q

Here's how to add more special keys
https://wiki.termux.com/wiki/Touch_Keyboard

## TL;DR
Add a new file ~/.termux/termux.properties with a content like this:

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

image

Was this page helpful?
0 / 5 - 0 ratings