remotekeyboard icon indicating copy to clipboard operation
remotekeyboard copied to clipboard

Can't type ESC

Open benjaminoakes opened this issue 12 years ago • 15 comments

I've gotten normal keypresses working, but ESC doesn't seem to do anything. I'm intending to use it with Vim Touch. Using ESC in the Hacker's Keyboard and hardware keyboards work just fine.

I'm using Android 4.3 on a Nexus 7, if it's relevant.

Thanks for maintaining Remote Keyboard!

Ben

benjaminoakes avatar Oct 14 '13 18:10 benjaminoakes

Am Montag, den 14.10.2013, 11:15 -0700 schrieb Ben Oakes:

I've gotten normal keypresses working, but ESC doesn't seem to do anything. I'm intending to use it with Vim Touch. Using ESC in the Hacker's Keyboard and hardware keyboards work just fine.

I'm using Android 4.3 on a Nexus 7, if it's relevant.

Thanks for maintaining Remote Keyboard!

Ben

— Reply to this email directly or view it on GitHub.

Hm, never thought about people using vim. The problem here is that the telnet protocol uses escape sequences as controls, hence when you press the escape key, you produce ^[ and remote keyboard will wait for additional characters. Not quite sure what to do here. This is partially a RK and telnet client problem.

onyxbits avatar Oct 15 '13 16:10 onyxbits

An alternative might be to use Ctrl-[ (which works as esc in Vim) -- would that be any easier to implement?

benjaminoakes avatar Oct 15 '13 18:10 benjaminoakes

Am Dienstag, den 15.10.2013, 11:30 -0700 schrieb Ben Oakes:

An alternative might be to use Ctrl-[ (which works as esc in Vim) -- would that be any easier to implement?

— Reply to this email directly or view it on GitHub.

For me, CTRL-[ just sends ESC, same problem, different keycombo. CTRL-] may be an idea. I'll have to think about it. If you need an immediate solution (and seeing that you are on github), you could simply redefine something like CTRL-R to your needs. Just edit CtrlInputAction.java, search for Ctrl-R and replace the "scramble(con)" line with typeKey(con,KeyEvent.KEYCODE_ESCAPE).

onyxbits avatar Oct 17 '13 20:10 onyxbits

Not an immediate problem to solve, but definitely affects usability of Vim. :smile:

I might take a look at implementing it... thanks so much for the responses!

benjaminoakes avatar Oct 17 '13 22:10 benjaminoakes

this frustrated me the other day...

does anyone know the cause? I think telnet protocol is eating the esc, but it's just a guess

jettero avatar Dec 05 '13 02:12 jettero

Am Mittwoch, den 04.12.2013, 18:05 -0800 schrieb Paul Miller:

this frustrated me the other day...

does anyone know the cause? I think telnet protocol is eating the esc, but it's just a guess

— Reply to this email directly or view it on GitHub.

Correct, Telnet uses the Escape character to start escape sequences in order to encode other function keys (e.g. cursor keys).

onyxbits avatar Dec 05 '13 23:12 onyxbits

makes me wonder if esc-esc should work or if there's some other code to do so.

jettero avatar Dec 06 '13 14:12 jettero

Am Freitag, den 06.12.2013, 06:31 -0800 schrieb Paul Miller:

makes me wonder if esc-esc should work or if there's some other code to do so.

— Reply to this email directly or view it on GitHub.

Nope. AFAIK you are suppose to provide some kind of custom mapping in your session to actually get the escape char through. There is no support for this in remote keyboard, though. Adding it would be quite difficult and I would rather not do it right now as it would imply rewriting the telnet server component (something I intent to do, but not in the immediate future).

onyxbits avatar Dec 09 '13 17:12 onyxbits

I find this acceptable. I have other workaround already.

Would be nice to get an alt code though, CTRL-E or something user configurable. Could live without ROT13, though it's cute, escape would be better. Nice is all. Would be nice.

jettero avatar Dec 09 '13 18:12 jettero

Am Montag, den 09.12.2013, 10:00 -0800 schrieb Paul Miller:

I find this acceptable. I have other workaround already.

Would be nice to get an alt code though, CTRL-E or something user configurable. Could live without ROT13, though it's cute, escape would be better. Nice is all. Would be nice.

— Reply to this email directly or view it on GitHub.

Yeah .. .i got a couple of ideas, but that will all be v3.0 and I don't have the time to do a rewrite atm.

onyxbits avatar Dec 17 '13 21:12 onyxbits

Any tips/improvements for using vim or nano with Remote Keyboard? I cannot use CTRL-O or anything similar.

Thanks a lot for developing Remote Keyboard!

cbhushan avatar Feb 03 '14 00:02 cbhushan

Am Sonntag, den 02.02.2014, 16:59 -0800 schrieb webid4me:

Any tips/improvements for using vim or nano with Remote Keyboard? I cannot use CTRL-O or anything similar.

Thanks a lot for developing Remote Keyboard!

— Reply to this email directly or view it on GitHub.

The problem pretty much is that the telnet protocoll uses the escape character to start escape sequences (e.g. to encode cursor keys), so pressing the escape key in a telnet session will never have the desired effect. Hm ... easiest workaround would probably be using a CTRL key combo. Not sure which it should be, though.

onyxbits avatar Feb 03 '14 13:02 onyxbits

This may not fit this thread but is it possible to allow all CTRL-() key presses to pass to android device?

I understand because of limitation of telnet protocol, ESC can not be used properly (which practically breaks the usage of vim). However, I was trying to use nano editor which mainly uses CTRL keys combinations. In my understanding, as of now some CTRL key combinations (like CTRL-C) is being used to provide some desktop side functionality. So, is it possible to just remove all these functionality (may be in a separate simpler app) and pass all these key combinations directly to the device? Could it be something which people would like to have?

cbhushan avatar Feb 03 '14 22:02 cbhushan

There's got to be some way to do it over telnet protocol. Back in the early 90s I often used vim over telnet. Also ... it might be possible to use a different protocol. SSH would be ok. anyone who has a telnet client probably has an ssh client. http would work. A cute little ajax scriptlet could be burped up out of the app as easy as anything else.

In short... I keep hoping....

jettero avatar Feb 04 '14 00:02 jettero

Am Montag, den 03.02.2014, 16:11 -0800 schrieb Paul Miller:

There's got to be some way to do it over telnet protocol. Back in the early 90s I often used vim over telnet. Also ... it might be possible to use a different protocol. SSH would be ok. anyone who has a telnet client probably has an ssh client. http would work. A cute little ajax scriptlet could be burped up out of the app as easy as anything else.

In short... I keep hoping....

— Reply to this email directly or view it on GitHub.

There naturally is a way to push escape over the line and that is negotiating what Escape is suppose to be. I won't implement the SSH protocol because there is no ready to use Java server implementation for it and writing one from scratch is not an option. WIFI keyboard already does HTTP. I'm not particularly fond of the "everything must be done in the webbrowser hype".

onyxbits avatar Feb 05 '14 22:02 onyxbits