Issue 369 in connectbot: Ctrl, Alt and ESC keys not working on bluetooth keyboard

263 views
Skip to first unread message

conne...@googlecode.com

unread,
Sep 27, 2010, 12:51:38 PM9/27/10
to connectbo...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 369 by sophana78: Ctrl, Alt and ESC keys not working on bluetooth
keyboard
http://code.google.com/p/connectbot/issues/detail?id=369

What steps will reproduce the problem?
1.Use bluetooth HID stack from cyanogenMod firmwares
2.Any bluetooth HID keyboard
3.

What is the expected output? What do you see instead?
Ctrl, Alt and ESC keys (on the keyboard) don't work.

What version of the product are you using (you can see this by using Menu
-> About in the Host List)?
connectBot stable (from market)

What type of system are you trying to connect to?
linux ssh

If you are able to connect, what is the output of "echo $TERM", "uname -a",
and any other relevant information on the host?


Please provide any additional information below.

I don't know if this is a connectBot issue, a bluetooth stack issue or an
IME issue. It would be nice to have all keyboard keys working (Ctrl, Alt
and ESC) with a real bluetooth keyboard.

Using the phone pad to do ctrl works, but it is unusable.

conne...@googlecode.com

unread,
Sep 27, 2010, 1:00:42 PM9/27/10
to connectbo...@googlegroups.com

Comment #1 on issue 369 by sophana78: Ctrl, Alt and ESC keys not working on
bluetooth keyboard
http://code.google.com/p/connectbot/issues/detail?id=369

The bluetooth stack is also available in opendesire and defrost firmwares.

conne...@googlecode.com

unread,
Dec 9, 2010, 4:29:21 AM12/9/10
to connectbo...@googlegroups.com

Comment #2 on issue 369 by rahvin: Ctrl, Alt and ESC keys not working on
bluetooth keyboard
http://code.google.com/p/connectbot/issues/detail?id=369

The same is also valid for USB keyboards and all types of hardware
keyboards.
I think this may be a problem that stems from the Android base system, as
the situation is the same for any other Android app at the moment - I don't
think the buttons are exposed via the API.

conne...@googlecode.com

unread,
Feb 2, 2011, 11:26:37 PM2/2/11
to connectbo...@googlegroups.com

Comment #3 on issue 369 by tmb...@gmail.com: Ctrl, Alt and ESC keys not

I'm seeing the same problem here with a Freedom Pro keyboard connected via
Bluetooth to a Galaxy Tab.

This problem with hardware keyboards is really limiting. With working
hardware keyboard support, ConnectBot on a Galaxy Tab would make an
excellent remote login solution.

conne...@googlecode.com

unread,
Apr 12, 2011, 8:44:42 AM4/12/11
to connectbo...@googlegroups.com

Comment #4 on issue 369 by linuxk...@gmail.com: Ctrl, Alt and ESC keys not

This problem appears to be due to mappings within Android. The Escape key
seems to map to the 'back' button. Ctrl keys simply send the non-ctrl
character.

It'd be great if ConnectBot could work around this, but I'm sceptical if
it's possible to work around at the layer ConnectBot operates.

conne...@googlecode.com

unread,
Apr 12, 2011, 12:20:06 PM4/12/11
to connectbo...@googlegroups.com

Comment #5 on issue 369 by tmb...@gmail.com: Ctrl, Alt and ESC keys not

You can't work around it perfectly, but you can make it quite a bit
better by making the system "teachable". For individual keys, like
Escape, do something like:

Configure "Escape" key > Please hit the key you would like to map to
"Escape" on your keyboard.

For modifier keys, you may need to try to infer the modifier key from
multiple key presses:

Configure "Ctrl" key > Please hit "Ctrl-A" on your keyboard, using the
modifier key that you would like to map to "Ctrl". > Please hit "Ctrl-B"
on your keyboard.

And you might have the option of mapping "Ctrl" to a prefix (the keys
aren't hit simultaneously, but one after the other):

Configure "Ctrl" key as a prefix. > Please hit the key on your keyboard
that you would like to map to a "Ctrl" prefix.

Finally, you may be able to use arbitrary keys as "Ctrl" keys by
detecting chording (X-down, Y-down, X/Y-up); I believe Bluetooth HID
supports that and I would guess the Android keyboard driver should pass
that on as well.

That way, whatever is possible with a keyboard and phone can be done.
Also, I can remap printable characters (e.g., weird national characters)
to act as "Escape" or a "Ctrl" prefix.

Tom

conne...@googlecode.com

unread,
Apr 12, 2011, 10:58:05 PM4/12/11
to connectbo...@googlegroups.com

Comment #6 on issue 369 by matt.foj...@gmail.com: Ctrl, Alt and ESC keys

This would be a very useful feature. I have Freedom Pro keyboard, and
Ctrl, Tab, Alt, Esc do not work with connectbot. I bought the keyboard so
it would be easier to code in emacs over connectbot, but without special
keys it is not very useful

conne...@googlecode.com

unread,
Apr 13, 2011, 11:23:30 PM4/13/11
to connectbo...@googlegroups.com

Comment #7 on issue 369 by Mi1e...@gmail.com: Ctrl, Alt and ESC keys not

Comment #5 is RIGHT-ON. EXACTLY what I've been asking for! I made the
point that this is similar to how some emulators work, mapping keys to
keypresses in the key binding menu (ala the *oid emulators by "yongzh").

conne...@googlecode.com

unread,
Apr 19, 2011, 12:58:55 PM4/19/11
to connectbo...@googlegroups.com

Comment #8 on issue 369 by are...@gmail.com: Ctrl, Alt and ESC keys not

Tab key works OK when I edit memo on my Galaxy S. In ConnectBot I need to
touch the screen, then tap CTRL then press "i" on my external BT keyboard.
Can this be fixed?

conne...@googlecode.com

unread,
May 8, 2011, 5:48:38 AM5/8/11
to connectbo...@googlegroups.com

Comment #9 on issue 369 by kbcm...@gmail.com: Ctrl, Alt and ESC keys not

I have similar problems with connectbot when using my Motorola Xoom and a
Motorola Bluetooth keyboard. Tab doesn't work in Connectbot but it works
fine in other applications. Arrow keys seem to work most of the time, but
none of the control key sequences work at all.

Batteries on keyboard are still fresh and Xoom charged over 80%.

conne...@googlecode.com

unread,
May 8, 2011, 8:58:17 PM5/8/11
to connectbo...@googlegroups.com

Comment #10 on issue 369 by Mi1e...@gmail.com: Ctrl, Alt and ESC keys not

Same symotoms on my Samsung Galaxy Tab hardware keyboard dock.

conne...@googlecode.com

unread,
May 9, 2011, 2:00:33 PM5/9/11
to connectbo...@googlegroups.com

Comment #11 on issue 369 by ktwomb...@gmail.com: Ctrl, Alt and ESC keys not

Same issue on ASUS transformer when using hardware keyboard dock.

conne...@googlecode.com

unread,
May 10, 2011, 5:51:01 AM5/10/11
to connectbo...@googlegroups.com

Comment #12 on issue 369 by Mi1e...@gmail.com: Ctrl, Alt and ESC keys not

Wouldn't it be really handy if ConnectBot same with a menu option to print
keyboard scancodes so that you can see what the heck your keys map out to
so that we can tell the author what our different keyboards are showing up
for things like CTRL or the mysterious blank key (like on my Samsung Galaxy
Tab keyboard dock, under the ENTER key)? :P Would be a nice debugging
tool and helpful way for users to give back some info on their varying
hardware.

Just saying.

conne...@googlecode.com

unread,
May 28, 2011, 5:40:06 PM5/28/11
to connectbo...@googlegroups.com

Comment #13 on issue 369 by kbcm...@gmail.com: Ctrl, Alt and ESC keys not

When I try to use the * (works fine in the browser as you can see) but in
ConnectBot, what it displays is ~9 on my Linux box. If I knew what I could
do to help, I would be happy to look up key codes for you or whatever, but
I'd need a little how-to that would help me give you what you're looking
for. Better yet, if you provided an application that gave me the list of
keys to hit, I could press each of them for you and send you the output
from the program. One way or the other, please help me help make CB
better. :-) It's been my favorite ssh program since my first Android
phone. :-)

KB


conne...@googlecode.com

unread,
Jun 1, 2011, 12:17:18 PM6/1/11
to connectbo...@googlegroups.com

Comment #14 on issue 369 by are...@gmail.com: Ctrl, Alt and ESC keys not

it's open source, seems that doing it yourself is the option. Look, this
case hangs since Sep 2010 and does not even have an owner.

conne...@googlecode.com

unread,
Jun 1, 2011, 1:00:51 PM6/1/11
to connectbo...@googlegroups.com

Comment #15 on issue 369 by Mi1e...@gmail.com: Ctrl, Alt and ESC keys not

Not everyone is a developer and can fix this for themselves. As well,
fixing it for yourself doesn't make it available as a new version in the
market for everyone else. Suggestions for the rest of us?

conne...@googlecode.com

unread,
Jun 2, 2011, 1:08:40 PM6/2/11
to connectbo...@googlegroups.com

Comment #16 on issue 369 by clark...@gmail.com: Ctrl, Alt and ESC keys not

I experience the same issue (at least, can verify the ctrl key) with a
Bluetooth keyboard on stock 3.1 with a Xoom. I also have seen issues with
shift-#s, e.g., I cannot type a * by doing shift-8 when connecting to a
server. It would be increase the functionality of connectbot dramatically
if ctrl, esc, and shift worked properly (Emacs user here!). Tab would also
be useful (since tab-completion seems to not work).

I can also verify that these keys do seem to work in other programs, such
as Google Talk.

In regards to the past couple comments -- I am a programmer by day, so if
someone can point me to the section of code which deals with this, I'd be
glad to go through the code on my upcoming flight and try to figure out
what is going wrong.

conne...@googlecode.com

unread,
Jun 4, 2011, 5:42:10 AM6/4/11
to connectbo...@googlegroups.com

Comment #17 on issue 369 by sophan...@gmail.com: Ctrl, Alt and ESC keys not

there are already some partial fixes posted:
http://code.google.com/p/connectbot/issues/detail?id=378

Seems that nobody from connectbot has included them.
Is connectbot a dead project?

conne...@googlecode.com

unread,
Jun 9, 2011, 7:22:17 PM6/9/11
to connectbo...@googlegroups.com

Comment #18 on issue 369 by stratumo...@gmail.com: Ctrl, Alt and ESC keys

I have observed the same issue on xoom using bluetooth keyboard. no tab or
ctrl functionality.

conne...@googlecode.com

unread,
Jun 29, 2011, 3:16:09 AM6/29/11
to connectbo...@googlegroups.com

Comment #19 on issue 369 by ondre...@gmail.com: Ctrl, Alt and ESC keys not

Same issue with Motorola Atrix

conne...@googlecode.com

unread,
Jun 30, 2011, 5:46:31 PM6/30/11
to connectbo...@googlegroups.com

Comment #20 on issue 369 by pfngu...@gmail.com: Ctrl, Alt and ESC keys not

I've opened pull request #16 on github
(https://github.com/kruton/connectbot/pull/16) -- works great with my
logitech bluetooth keyboard

conne...@googlecode.com

unread,
Jul 1, 2011, 10:19:22 PM7/1/11
to connectbo...@googlegroups.com

Comment #21 on issue 369 by ktwomb...@gmail.com: Ctrl, Alt and ESC keys not

I installed the latest development build a few minutes ago. I can see that
the built-in shortcuts work now, such as ctrl+c for copy, ctrl+u for URL
search, but connectbot still doesn't seem to be *sending* ctrl or alt to
the remote server when pressed. :(

conne...@googlecode.com

unread,
Jul 1, 2011, 10:38:25 PM7/1/11
to connectbo...@googlegroups.com

Comment #22 on issue 369 by ktwomb...@gmail.com: Ctrl, Alt and ESC keys not

I take that back, sorta. I undocked my transformer and redocked it, and now
the meta keys seem to be working like a charm.

conne...@googlecode.com

unread,
Jul 2, 2011, 8:38:58 AM7/2/11
to connectbo...@googlegroups.com

Comment #23 on issue 369 by 3575...@gmail.com: Ctrl, Alt and ESC keys not

I just tried the latest featured (4.26.38) version with my BT keyboard. I
just connected to my linux box and press some keys :-) The results is:

- The Alt button start working. Hurrah! Although it is not "sticky", but
this is the begin :-)

Unfortunately, this is only good thing. All other is bad :-(

- The "Ctrl" key still don't work at all
- The "Home" key works like home button and the "End" key works like power
button. This is small problem, but Esc key works as "back button" ant this
is much worse for any *nix system :-(

Please, don't stop! The connectbot is the best ssh client for Androis OS
and we all waiting for resolving this issue :-)

conne...@googlecode.com

unread,
Jul 2, 2011, 1:04:35 PM7/2/11
to connectbo...@googlegroups.com

Comment #24 on issue 369 by pfngu...@gmail.com: Ctrl, Alt and ESC keys not

Sounds like your keyboard doesn't send the correct key code for ctrl esc
home or end.

Alt shouldn't be sticky on an external keyboard.

conne...@googlecode.com

unread,
Jul 2, 2011, 1:20:38 PM7/2/11
to connectbo...@googlegroups.com

Comment #25 on issue 369 by 3575...@gmail.com: Ctrl, Alt and ESC keys not

I don't know. I use some "standard" unnamed BT keyboard. This model works
fine with WM, Symbian and iPhone. So I think this must be some program
error. I repeat - this is _BlueTooth_ keyboard, not just "external". I'm
sure this is important.

P.S. Apropos, The Cntrl key on BT keyboard works just fine in "Better
Terminal Emulator Pro" SSH Client. Unfortunately I can't use this client
because of some another problems with it ;-)

conne...@googlecode.com

unread,
Jul 3, 2011, 1:50:35 AM7/3/11
to connectbo...@googlegroups.com

Comment #26 on issue 369 by pfngu...@gmail.com: Ctrl, Alt and ESC keys not

I dunno about your keyboard, but it works fine with my bluetooth logitech
keyboard which sends all the standard scancodes.

Are you on honeycomb? No idea how it would work prior to 3.0

conne...@googlecode.com

unread,
Jul 3, 2011, 2:09:39 AM7/3/11
to connectbo...@googlegroups.com

Comment #27 on issue 369 by 3575...@gmail.com: Ctrl, Alt and ESC keys not

I use Gingerbread (2.3.3)

conne...@googlecode.com

unread,
Jul 3, 2011, 1:48:45 PM7/3/11
to connectbo...@googlegroups.com

Comment #28 on issue 369 by pfngu...@gmail.com: Ctrl, Alt and ESC keys not

Yeah, that explains that

conne...@googlecode.com

unread,
Jul 3, 2011, 3:32:18 PM7/3/11
to connectbo...@googlegroups.com

Comment #29 on issue 369 by 3575...@gmail.com: Ctrl, Alt and ESC keys not

So, right now we have the solution for tablets, but still do not have
solution for smartphones :'-(

conne...@googlecode.com

unread,
Jul 3, 2011, 8:54:16 PM7/3/11
to connectbo...@googlegroups.com

Comment #30 on issue 369 by are...@gmail.com: Ctrl, Alt and ESC keys not

actually, after installing latest development version (2011-07-01) the TAB
key started working, the rest of the keys (CTRL, ALT, ESC) still not working

conne...@googlecode.com

unread,
Jul 5, 2011, 12:53:53 PM7/5/11
to connectbo...@googlegroups.com

Comment #33 on issue 369 by apbar...@gmail.com: Ctrl, Alt and ESC keys not

working on the ASUS transformer. NOW it's become a serious productivity
machine. Where should my donation go?

conne...@googlecode.com

unread,
Jul 5, 2011, 12:49:52 PM7/5/11
to connectbo...@googlegroups.com

Comment #32 on issue 369 by apbar...@gmail.com: Ctrl, Alt and ESC keys not

conne...@googlecode.com

unread,
Jul 11, 2011, 4:11:45 PM7/11/11
to connectbo...@googlegroups.com

Comment #34 on issue 369 by i...@live-net.sk: Ctrl, Alt and ESC keys not

For Asus Transformer support see Issue 459.


conne...@googlecode.com

unread,
Sep 9, 2011, 6:15:23 PM9/9/11
to connectbo...@googlegroups.com

Comment #35 on issue 369 by dro...@gmail.com: Ctrl, Alt and ESC keys not

Using plain USB keyboard on an Acer Iconia Tab A500, similar problems.
Ctrl+anything always inserts ^@, and shift+numbers inserts random control
codes instead of correct symobols like !@#$%^&*(). Makes it nearly
impossible to perform tasks on linux servers :'(

conne...@googlecode.com

unread,
Sep 9, 2011, 7:18:53 PM9/9/11
to connectbo...@googlegroups.com

conne...@googlecode.com

unread,
Sep 11, 2011, 7:51:49 PM9/11/11
to connectbo...@googlegroups.com

Comment #37 on issue 369 by pfngu...@gmail.com: Ctrl, Alt and ESC keys not

Have you guys tried the tablet branch version yet? Works perfectly fine
with my bluetooth keyboard. (honeycomb and newer only).

conne...@googlecode.com

unread,
Sep 12, 2011, 4:54:22 AM9/12/11
to connectbo...@googlegroups.com

Comment #38 on issue 369 by 3575...@gmail.com: Ctrl, Alt and ESC keys not

On my samsung galaxy S2 tablet branch crashes after connect and just after
screen turning. Master version still don't work with ctrl.

conne...@googlecode.com

unread,
Sep 12, 2011, 11:30:44 AM9/12/11
to connectbo...@googlegroups.com

Comment #39 on issue 369 by pfngu...@gmail.com: Ctrl, Alt and ESC keys not

Tablet branch isn't ready for phones yet, I think

conne...@googlecode.com

unread,
Sep 12, 2011, 2:16:11 PM9/12/11
to connectbo...@googlegroups.com

Comment #40 on issue 369 by pmis...@gmail.com: Ctrl, Alt and ESC keys not

Notion Ink Adam, Android 2.2 (BeastRom), tablet branch crashes on start.


conne...@googlecode.com

unread,
Sep 12, 2011, 2:20:23 PM9/12/11
to connectbo...@googlegroups.com

Comment #41 on issue 369 by Mi1e...@gmail.com: Ctrl, Alt and ESC keys not

Is there an available apk for the tablet branch? Will it install on a
Samsung Galaxy Tab running Froyo?

conne...@googlecode.com

unread,
Sep 12, 2011, 2:24:31 PM9/12/11
to connectbo...@googlegroups.com

Comment #42 on issue 369 by Mi1e...@gmail.com: Ctrl, Alt and ESC keys not

Tablet branch is a no-go on Samsung Galaxy Tab running Android 2.2, nor
Motorola Droid A855 running Android 2.3.4, sooooo..... no. Haven't tried
it. :)

conne...@googlecode.com

unread,
Sep 25, 2011, 12:51:00 AM9/25/11
to connectbo...@googlegroups.com

Comment #43 on issue 369 by jrcon...@gmail.com: Ctrl, Alt and ESC keys not

I think there's a fairly simple patch for this. In short, I added a
hardkeyboard check using is(Alt|Shift|Ctrl)Pressed() to update curMetaState.

It seems to work on my Xoom using a bluetooth keyboard. I also tested the
virtual keyboard and that seemed to stay the same.

Feel free to review, optimize and test since the beer tends to make me miss
stuff.

Attachments:
issue_369.diff 1.8 KB

conne...@googlecode.com

unread,
Sep 25, 2011, 5:40:33 PM9/25/11
to connectbo...@googlegroups.com

Comment #44 on issue 369 by Mi1e...@gmail.com: Ctrl, Alt and ESC keys not

If that's all we need... OH.. MY.. GOD! You are THE MAN! :) I eagerly
await a new update/release in the Android market to try this out on my
various Android-based devices. I DESPERATELY need this functionality in
order to do any kind of real work. THANK YOU! :)

conne...@googlecode.com

unread,
Sep 26, 2011, 7:34:03 PM9/26/11
to connectbo...@googlegroups.com

Comment #45 on issue 369 by pfngu...@gmail.com: Ctrl, Alt and ESC keys not

@jrcon... the tablet branch already has support for bluetooth/external
keyboards.

Additionally, your patches only work on honeycomb or newer anyway. Can't
go into the master branch as-is.

conne...@googlecode.com

unread,
Sep 30, 2011, 11:59:51 PM9/30/11
to connectbo...@googlegroups.com

Comment #46 on issue 369 by 100Dash...@gmail.com: Ctrl, Alt and ESC keys

@pfngu

I tried a Tablet SVN build and it didn't support ctrl and meta on my USB
keyboard. Is the tablet branch supposed to do this?

conne...@googlecode.com

unread,
Oct 1, 2011, 3:25:52 AM10/1/11
to connectbo...@googlegroups.com

Comment #47 on issue 369 by lkokli...@gmail.com: Ctrl, Alt and ESC keys not

I tried this version:
http://sourceforge.net/projects/chdistro-droid/files/ConnectBot-ext-keyboard/

ctrl, alt, tab, esc all work on my htc desire with bluetooth keyboard.


conne...@googlecode.com

unread,
Oct 1, 2011, 4:06:04 AM10/1/11
to connectbo...@googlegroups.com

Comment #48 on issue 369 by pmis...@gmail.com: Ctrl, Alt and ESC keys not

Cool, thanks for confirming! It works by using keyboard scancodes, which is
industry standard (even if maybe de facto). Just need to collect more
evidence to convince the maintainer, following first attempt (with not too
clean code, yeah) at https://github.com/kruton/connectbot/pull/3

Just in case, my changes can be reviewed here:
https://sourceforge.net/p/chdistro-droid/connectbot/ci/ext-keyboard/log/


conne...@googlecode.com

unread,
Oct 2, 2011, 1:27:06 AM10/2/11
to connectbo...@googlegroups.com

Comment #49 on issue 369 by 100Dash...@gmail.com: Ctrl, Alt and ESC keys

> Cool, thanks for confirming! It works by using keyboard scancodes, which

> is industry >standard (even if maybe de facto). Just need to collect more
> evidence to convince the >maintainer, following first attempt (with not
> too clean code, yeah) at >https://github.com/kruton/connectbot/pull/3

> Just in case, my changes can be reviewed here:
> https://sourceforge.net/p/chdistro->droid/connectbot/ci/ext-keyboard/log/

I tried this version on my Thinkpad Tablet with three USB keyboards, and I
didn't have any luck. I used the Thinkpad folio case, a wireless mini
keyboard (Rii Mini), and a standard USB desktop keyboard.

conne...@googlecode.com

unread,
Oct 2, 2011, 2:22:16 AM10/2/11
to connectbo...@googlegroups.com

Comment #50 on issue 369 by pmis...@gmail.com: Ctrl, Alt and ESC keys not

(Feel like this bug becomes semi-offtopic forum, but it actually did long
time ago, so just continuing.)

How did you test it, what output did you get and what you expected? Besides
that, your next step is using tool like
http://github.com/chrisboyle/keytest/downloads to carefully write down its
output for each of "problematic" keys like Esc, both Ctrl's, etc.


conne...@googlecode.com

unread,
Oct 2, 2011, 2:39:23 AM10/2/11
to connectbo...@googlegroups.com

Comment #51 on issue 369 by 100Dash...@gmail.com: Ctrl, Alt and ESC keys

> "How did you test it, what output did you get and what you expected?"

Using ConnectBot-ext-keyboard-0-g815d488-debug on Thinkpad Tablet running
Android 3.1, kernel 2.6.36.3.

With Rii N7:

Steps to reproduce:
1. Connected Rii N7 via USB transceiver
2. Opened a connection by unlocking a key and waiting for a bash prompt to
appear
3. Typed in "test"
4. Hit ctrl+a

Expected results:
The text caret moves to the beginning of the line

Actual Results:
The text caret remained where it was. No text was entered (i.e., no
erroneous "a" as entered).

Dump from keytest while pressing ctrl:
> Keycode: 113
> KeyEvent: KeyEvent{action=ACTION_DOWN keycode=KEYCODE_CTRL_LEFT
> scancode=29 metaState=META_CTRL_ON|META_CTRL_LEFT_ON flags=0x8 repeat=0
> device=19 source=0x101}

Dump from keytest while pressing ctrl+a:
> Keycode: 29
> KeyEvent: KeyEvent{action=ACTION_DOWN keycode=KEYCODE_A scancode=30
> metaState=META_CTRL_ON|META_CTRL_LEFT_ON flags=0x8 repeat=0 device=23
> source=0x101}

With USB Thinkpad Tablet Keyboard Folio Case:

Steps to reproduce:
Same as above

Results:
1. Immediately after depressing the a key when pressing ctrl+a, an "a" is
inserted. (i.e., "testa")
2. After releasing the depressed ctrl key, the menu appears

Expected Results:
1. Text caret moves to beginning of line, no "a" inserted
2. The menu doesn't appear.

On the keyboard folio case, the keycap for the control key is inscribed
with both "Ctrl" and the Android menu icon, indicating, presumably, that it
functions as a menu button when not used as a control.

Dump from keytest for ctrl on keyboard from keyboard folio case:
> Keycode: 82
> KeyEvent: KeyEvent{action=ACTION_DOWN keycode=KEYCODE_MENU scancode=139
> metaState=0 flags=0x8 repeat=0 device=22 source=0x101}


conne...@googlecode.com

unread,
Oct 2, 2011, 3:06:28 AM10/2/11
to connectbo...@googlegroups.com

Comment #52 on issue 369 by pmis...@gmail.com: Ctrl, Alt and ESC keys not

Thanks for detailed report. Few things I see from it. First of all, Lenovo
Thinkpad Tablet is Android 3.x device, and 3.x has native Control keys
support, and handling that already included in ConnectBot upstream. It's
very strange it doesn't work for you (but I don't have 3.x device and never
tested it).

Otherwise:

Rii N7:


KeyEvent: KeyEvent{action=ACTION_DOWN keycode=KEYCODE_CTRL_LEFT scancode=29
metaState=META_CTRL_ON|META_CTRL_LEFT_ON flags=0x8 repeat=0 device=19
source=0x101}

3.x CTRL state is reported as expected, and scancode is correct for Left
Ctrl (my code would recognize it).

Does Rii have Right Ctrl and would you be able to post KeyEvent for it?


USB Thinkpad Tablet Keyboard Folio Case:

KeyEvent: KeyEvent{action=ACTION_DOWN keycode=KEYCODE_MENU scancode=139

metaState=0 flags=0x8 repeat=0 device=22 source=0x101}

This is completely mad, you see. Scancode (0x8b) is unknown to
http://www.win.tue.nl/~aeb/linux/kbd/scancodes-1.html (way above nornal
range), and keycode generated is for menu, so menu you get.


Summing up:
Rii not working is weird. Did you try pristine ConnectBot? Tablet branch? I
will look if my patch might interact badly with Honeycomb CTRL handling
(though I already tried to write is so that scancode handling happens as
the last resort, if nothing else processed a key before).

Folio case not working is the result of typical OEM braindeadness (you can
see other examples in AC100 pull request above). It would be possible to
make it work by extending my scancode patch (but first need to figure out
why it doesn't work for you of course).


conne...@googlecode.com

unread,
Oct 2, 2011, 3:10:31 AM10/2/11
to connectbo...@googlegroups.com

Comment #53 on issue 369 by pmis...@gmail.com: Ctrl, Alt and ESC keys not

According to Linux kernel:

#define KEY_MENU 139

So, it's not random scancode, the vendor *wanted* that key to be menu, so
there it is. Are you sure it's a Ctrl key at all? ;-)

conne...@googlecode.com

unread,
Oct 6, 2011, 6:59:25 AM10/6/11
to connectbo...@googlegroups.com

Comment #54 on issue 369 by pfo...@gmail.com: Ctrl, Alt and ESC keys not

Just tried
http://sourceforge.net/projects/chdistro-droid/files/ConnectBot-ext-keyboard/
on my Acer a500 with a logitech usb keyboard : does not seems to work at all

Can't abord a ping request using ctrl + c

keytest confirm that correct scancode are received

conne...@googlecode.com

unread,
Oct 7, 2011, 2:38:03 AM10/7/11
to connectbo...@googlegroups.com

Comment #55 on issue 369 by litan...@googlemail.com: Ctrl, Alt and ESC keys

Looks to me as if TerminalKeyListener is only trying to process Ctrl keys
when there is no hardware keyboard.

Similarly, shift-number keys aren't working with a hardware keyboard
because it is inappropriately using sendFunctionKey() to deal with them.

The following patch appears to fix both issues on my Xoom/Motorola
Bluetooth Keyboard combo; but I'm not sufficiently familiar with the
Connectbot codebase, or Android development in general to know what I might
have broken in the process (which is why I feel it is appropriate to put it
inline rather than make it all-too-easy to apply). Note that while the
Ctrl-key combinations now work, they're *also* recognized as menu
accelerators :(

diff --git a/src/org/connectbot/service/TerminalKeyListener.java
b/src/org/connectbot/service/TerminalKeyListener.java
index 6330479..3e15d1e 100644
--- a/src/org/connectbot/service/TerminalKeyListener.java
+++ b/src/org/connectbot/service/TerminalKeyListener.java
@@ -251,12 +251,6 @@ public class TerminalKeyListener implements
OnKeyListener, OnSharedPreferenceCha
key = keyAsControl(key);
}

- // handle pressing f-keys
- if ((hardKeyboard && !hardKeyboardHidden)
- && (curMetaState &
KeyEvent.META_SHIFT_ON) != 0
- && sendFunctionKey(keyCode))
- return true;
-
if (key < 0x80)
writeToBridge(key);
else
@@ -266,8 +260,7 @@ public class TerminalKeyListener implements
OnKeyListener, OnSharedPreferenceCha
return true;
}

- // send ctrl and meta-keys as appropriate
- if (!hardKeyboard || hardKeyboardHidden) {
+ if (true) {
int k = event.getUnicodeChar(0);
int k0 = k;
boolean sendCtrl = false;


conne...@googlecode.com

unread,
Dec 24, 2011, 4:28:11 PM12/24/11
to connectbo...@googlegroups.com

Comment #56 on issue 369 by sniem...@gmail.com: Ctrl, Alt and ESC keys not

> I tried this version:
> http://sourceforge.net/projects/chdistro-droid/files/ConnectBot-ext-keyboard/

> ctrl, alt, tab, esc all work on my htc desire with bluetooth keyboard.

confirmed on HTC Rezound with Zippy BT500 keyboard.

Issue: shift-numeric keys are broken:

Shift-1 = ! and shift-4=$ are broken when using VI... I can't force quite
VI (without saving) ... bummer!

Hope this is an easy fix?

Thanks for the good work!

conne...@googlecode.com

unread,
Jan 4, 2012, 2:06:13 PM1/4/12
to connectbo...@googlegroups.com

Comment #57 on issue 369 by gru3hun...@gmail.com: Ctrl, Alt and ESC keys

Bought a dell Y-RAQ-DEL2 aka GM952 for $25 on eBay.
Google Nexus Galaxy ICS 4.0

In ConnectBot none of the shift keys ex: shift 1 "!" through shift 0 ")" -
the phone just buzzes like I pressed an invalid key. The numeric keypad
does work as :"<>? all work.

The shift keys DO work in the Gmail app on the phone making me think this
is limited to a connectbot issue.


conne...@googlecode.com

unread,
Jan 7, 2012, 4:06:51 AM1/7/12
to connectbo...@googlegroups.com

Comment #58 on issue 369 by beatty.d...@gmail.com: Ctrl, Alt and ESC keys
r u making love to me? It is a connectbot issue. The code that does this
appears to be in the yourdir/connectbot/de/mud/ directory in a file
containing some "function declarations" ( to this old C programmer who
ain't programmed in a decade or so Don't know or care what it's called in
Java). Both the mouse coordinate handling, and the keyboard handling
including over-ride for ctrl keys.

from the connectbot source code:
/connectbot/src/de/mud/terminal/VDUInput.java

line 4 :

* (c) Matthias L. Jugel, Marcus Meißner 1996-2005. All Rights Reserved.

QUESTION is this the copyright notice date for the file itself? Damn that's
an old file, 1996 I had only been a slackware (l)user for a year. I had
hair, that was long ago. Now I'm an old bald (l)user. time flies.

then the GNU license, then this

/**
* Handle key Typed events for the terminal, this will get
* all normal key types, but no shift/alt/control/numlock.
* @param keyCode the key code
* @param keyChar the character represented by the key
* @param modifiers shift/alt/control modifiers
*/
void keyTyped(int keyCode, char keyChar, int modifiers);
}




At first glance the code that gives crtl and esc functions from trackball
may be redundant to commenting out one declaration. Rarely that simple
though. Anybody here not too lazy to run this change through eclipse? I'd
need another six hours of reading - NEVER used eclipse. vi/perl kind of dog
here and that in the last century. Anyone save a lazy old man from doing
some useful shinola? kids? hello? :)

I need a GNU phone, what the chicken rice soup is all this Java needed
for? "Yeah, we got GNU/Linux running on the ARM processors from work
started in the late nineties, so it's stable and mature. Hey! I got an
idea, lets use an "application framework"!! WRITTEN IN JAVA!! cue Mickey
Rooney/Judy Garland media file....... Yeah a virtual machine! It'll
virtually be the best virtual machine ever! and so on.

I mean it's better (slightly ** from an ethical standpoint as well as
technical ) than CE or Apple. BUT why are we using a language we can't hack
on top of an operating system we did? Doesn't the Java license kind of sort
of prevent users from studying/modifying the internals of Java to suit
their own purposes and see how it works? That's not how I like to get down.
YMMV

Anyway, I'm going back to working on dual boots and str8 up gnu/linux
distros on my droid hardware. Hopefully will only be using android when I
have to use a mobile phone. Still can't understand why those aren't
obsolete either, but that's my radio nerd rant. Maybe another time.



conne...@googlecode.com

unread,
Jan 7, 2012, 4:30:57 AM1/7/12
to connectbo...@googlegroups.com

Comment #59 on issue 369 by michal....@gmail.com: Ctrl, Alt and ESC keys

@beatty.d...@gmail.com, this was LOVELY, thank you!

conne...@googlecode.com

unread,
Jan 8, 2012, 7:16:30 AM1/8/12
to connectbo...@googlegroups.com

Comment #60 on issue 369 by beatty.d...@gmail.com: Ctrl, Alt and ESC keys

You are welcome Michael. I've been waiting for my gnu/linux palmtop with
phone since I read Sam's "Linux Unleashed, Slackware 2.0". Still waiting.

QUESTION? Is there some valid reason to smubosh the ctrl/alt/esc keys in an
ssh session? Looks to me like the code came from a Java Terminal project of
some kind that predates Android.

Could it be something like the BBS operators did back in the days of yore
to keep folks from crashing the board and gaining control of the box?

I'm still trying to figure out where VDUINput.java came from and why
they did that. Almost at the point where I'll try to map foo/bar/baaz to
crtl/alt/esc.

Apparently they keep their dead at http://javatelnet.org/ .... I'm
starting here. http://javatelnet.org/space/Docs+and+Tutorials The site
ain't been updated in seven years. At least it's GNU licensed.

conne...@googlecode.com

unread,
Jan 11, 2012, 8:26:34 PM1/11/12
to connectbo...@googlegroups.com

Comment #61 on issue 369 by gru3hun...@gmail.com: Ctrl, Alt and ESC keys

Just tried the same test with a logitech tablet keyboard Android 3.0+
930-003390 and it does the same thing (no ctrl/esc, no shift #'s)

Also tried the latest developer build, and the ChDistro Ext Keyboard for
Connectbot
sourceforge.net/projects/chdistro-droid/files/ConnectBot-ext-keyboard/ and
it does not work either.


conne...@googlecode.com

unread,
Jan 17, 2012, 3:25:53 AM1/17/12
to connectbo...@googlegroups.com

Comment #62 on issue 369 by j...@aims.ac.za: Ctrl, Alt and ESC keys not

Note: This issue persists with Android 4.

Logitech Bluetooth (
http://www.logitech.com/en-za/gaming/mice-keyboard-combos/devices/3616 )
and Galaxy Nexus with Android 4.0.2 adn Connectbot 1.7.1 2010.10.08

I'll try connectbot-ext-keyboard later.

conne...@googlecode.com

unread,
Jan 18, 2012, 4:04:30 AM1/18/12
to connectbo...@googlegroups.com

Comment #63 on issue 369 by j...@aims.ac.za: Ctrl, Alt and ESC keys not

Update: Android4

I yesterday installed
http://sourceforge.net/projects/chdistro-droid/files/ConnectBot-ext-keyboard/

The tab and alt keys work now, control does not. I have hackerskeyboard
installed,
and a tap on screen brings up the control, escape, and keyboard icons, and
after clicking control, the hardware keyboard control does send control.
This is still quite inconvenient compared to a hardware keyboard's control
key working.

conne...@googlecode.com

unread,
Jan 25, 2012, 6:06:55 PM1/25/12
to connectbo...@googlegroups.com

Comment #64 on issue 369 by neilalexanderr: Ctrl, Alt and ESC keys not

No luck with Ctrl key with a Motorola Bluetooth Keyboard on a Motorola XOOM
Wi-Fi tablet.

conne...@googlecode.com

unread,
Jan 26, 2012, 3:06:11 AM1/26/12
to connectbo...@googlegroups.com

Comment #65 on issue 369 by michal....@gmail.com: Ctrl, Alt and ESC keys

ConnectBot-ext-keyboard package mentioned above works just GREAT with
Samsung Galaxy i9000 and Freedom Keyboard Pro. I feel the power of
this small machine again, typing this over links with byobu enabled.
Everything works as expected, THANK YOU THANK YOU THANK YOU.

2012/1/26, conne...@googlecode.com <conne...@googlecode.com>:

conne...@googlecode.com

unread,
Jan 26, 2012, 8:09:04 AM1/26/12
to connectbo...@googlegroups.com

Comment #66 on issue 369 by gvid...@gmail.com: Ctrl, Alt and ESC keys not

Galaxy Nexus ICS 4.0.2 and freedom pro keyboard does not work for the top
row keys like ! And # with the anroid market version of connectbot;
however, keys work fine in other apps like google.docs for instance.


conne...@googlecode.com

unread,
Jan 26, 2012, 10:24:58 AM1/26/12
to connectbo...@googlegroups.com

Comment #67 on issue 369 by clark...@gmail.com: Ctrl, Alt and ESC keys not

Have gotten Xoom and BT keyboard working in following way -- start
ConnectBot (tablet version) without BT keyboard; ssh to server; leave
ConnectBot (e.g., go to home screen); connect to BT keyboard; go back to
ConnectBot; everything works. Not sure why that is needed, but it works.

conne...@googlecode.com

unread,
Feb 4, 2012, 9:52:55 PM2/4/12
to connectbo...@googlegroups.com

Comment #68 on issue 369 by robert.m...@gmail.com: Ctrl, Alt and ESC keys

I can confirm that ConnectBot-ext [1]_ works with Apple Wireless
Keyboard [2]_ on my Samsung Galaxy S2 [3]_ and provides full use of
Ctrl, Alt, function keys, and most importantly, Esc. (Tested on a
Samsung Galaxy S2).

Results with the same ConnectBot-ext [1]_ on with the Samsung Galaxy
Tab 10.1 Bluetooth Keyboard Case [4]_ on my Samsung Galaxy Tab 10.1
[5]_ are less stellar: Esc and function keys work, but Ctrl does not.

- Robert

PS - Is there a wiki we can collate a compatibility table on? I lack
permission to create a wiki page on [1]_.

.. [1]
http://sourceforge.net/projects/chdistro-droid/files/ConnectBot-ext-keyboard/
(g815d488)
.. [2] http://www.apple.com/uk/keyboard/
.. [3] Android v2.3.3
.. [4]
http://www.samsung.com/us/mobile/galaxy-tab-accessories/BKC-1B1USBGSTA
.. [5] Android v3.1

conne...@googlecode.com

unread,
Feb 6, 2012, 8:05:47 PM2/6/12
to connectbo...@googlegroups.com

Comment #69 on issue 369 by stephen....@oceanfree.net: Ctrl, Alt and ESC
keys not working on bluetooth keyboard
http://code.google.com/p/connectbot/issues/detail?id=369

Connectbot-ext-keyboard also works great for me (CTRL and Tab function
correctly) with external USB keyboard (built into case) with a generic
Chinese tablet, Tabtronics M009SC running Android 2.3.4.

conne...@googlecode.com

unread,
Feb 6, 2012, 8:26:05 PM2/6/12
to connectbo...@googlegroups.com

Comment #70 on issue 369 by pmis...@gmail.com: Ctrl, Alt and ESC keys not

2 robert.m... : It's for sure good idea to collect the compatibility data,
and it would be even more useful if accompanied by output from
http://github.com/chrisboyle/keytest/downloads (for cases it doesn't work).
I'm not sure what would be the good place to collect that info.
chdistro-droid project, where ConnectBot-ext-keyboard happens to be hosted,
is dedicated to other topic, so I'm not sure if it's worth to put such data
there. All in all, if you'd start such a wiki page somewhere with public
access, just post it here, that would be good step.


conne...@googlecode.com

unread,
Feb 7, 2012, 12:45:06 AM2/7/12
to connectbo...@googlegroups.com

Comment #71 on issue 369 by kbcm...@gmail.com: Ctrl, Alt and ESC keys not

Hackerskeyboard is a tremendous find! It doesn't fix the problems with the
external keyboard, but it is a vast improvement over the stock soft
keyboard that comes with Android. Wow!

KB

conne...@googlecode.com

unread,
Mar 14, 2012, 12:25:46 AM3/14/12
to connectbo...@googlegroups.com

Comment #72 on issue 369 by bicheng....@meridianmedex.com: Ctrl, Alt and
ESC keys not working on bluetooth keyboard
http://code.google.com/p/connectbot/issues/detail?id=369

I tested the solution posted on COMMENT 67. I am having XOOM and Logitech
BT keyboard. Everything works, including:
1) esc
2)ctrl
3) shift + numerical keys: !@#$%^&*()

conne...@googlecode.com

unread,
Mar 14, 2012, 12:30:50 AM3/14/12
to connectbo...@googlegroups.com

Comment #73 on issue 369 by greatest...@gmail.com: Ctrl, Alt and ESC keys

The solution posted inside COMMENT 67 works. I have XOOM (android 4.0) +
Logitech BT keyboard. The following functions are working
1) ESC
2) CTRL
3) Shift+numerical keys !@#$%^&*()


conne...@googlecode.com

unread,
Mar 14, 2012, 3:24:28 PM3/14/12
to connectbo...@googlegroups.com

Comment #74 on issue 369 by greatest...@gmail.com: Ctrl, Alt and ESC keys

The solution posted inside COMMENT 55 seems to be a better solution. I
recompiled the code by using the latest build (on 3/14/2012) and combining
the code inside COMMENT 55.
The following keys are verified on XOOM (Android 4.03)+Logitech BT keyboard:
1) ESC
2) TAB
3) Shift + Numerical Keys !@#$%^&*()

Attachments:
connectbot.apk 881 KB

conne...@googlecode.com

unread,
May 26, 2012, 5:59:58 PM5/26/12
to connectbo...@googlegroups.com

Comment #75 on issue 369 by anth...@bifb.org: Ctrl, Alt and ESC keys not
FYI: I'm using ConnectBot-git-tablet-2011-12-19_18-30-54.apk with an Acer
A500 tablet and an external bluettoth "ZAGGkeys Flex" keyboard and the TAB
and CRTL keys work fine. There is no escape key, but CTRL-[ works. The
shift/numerical keys work too.

conne...@googlecode.com

unread,
Jul 20, 2012, 7:18:50 PM7/20/12
to connectbo...@googlegroups.com

Comment #76 on issue 369 by IAmCor...@gmail.com: Ctrl, Alt and ESC keys not
I also have a freedom pro wireless bluetooth keyboard and just got a nexus
7. I cannot get Tab, Esc, or Ctrl to work properly without using the
onscreen Ctrl or Esc (and using the onscreen Ctrl and then pressing 'i' on
the keyboard for tab) this really limits how much I can get done on
connectbot.

conne...@googlecode.com

unread,
Aug 3, 2012, 12:29:49 AM8/3/12
to connectbo...@googlegroups.com

Comment #77 on issue 369 by Albright...@gmail.com: Ctrl, Alt and ESC keys
This if for the the Samsung Galaxy tab 10.1 using the official samsung
keyboard dock

I find if you change the soft keyboard from Samsung to the Android default,
then the Ctrl key works in connectbot while ssh'd into linux.

Now, to figure out how to map ESC to one of the keys....

conne...@googlecode.com

unread,
Aug 3, 2012, 12:44:27 AM8/3/12
to connectbo...@googlegroups.com

Comment #78 on issue 369 by ramer...@gmail.com: Ctrl, Alt and ESC keys not
Well I wish that was the case with the Logitech Android Tablet Keyboard and
a Nexus 7, as control doesn't work here. It would be nice if it did... It
wouldn't be so bad if there was a way to simulate Ctrl on a soft keyboard...

conne...@googlecode.com

unread,
Aug 3, 2012, 12:45:28 AM8/3/12
to connectbo...@googlegroups.com

Comment #79 on issue 369 by Albright...@gmail.com: Ctrl, Alt and ESC keys
Last update: I got the ESC key working on the attached keyboard (Galaxy
Tab 10.1 wifi).

I installed busybox on my rooted Tab, and edited
system/usr/keylayout/querty.kl

From there, I added the line "key 1 SEARCH" underneath "key399 GRAVE"

I then commented out "key 127 SEARCH" and "key 217 SEARCH" because I will
never use that button ever for anything else.

Boom bam shazam, the goofy search key on my keyboard dock now sends ESC
instead of search commands - which is all I ever wanted. Let the SSH fun
begin!

conne...@googlecode.com

unread,
Aug 3, 2012, 12:51:51 AM8/3/12
to connectbo...@googlegroups.com

Comment #80 on issue 369 by Albright...@gmail.com: Ctrl, Alt and ESC keys
ramercer, download the APK KeyEvent Display - it (should) tell you the
internal bindings to the ctrl key.

You can find all of android's internal keycodes here:
http://developer.android.com/reference/android/view/KeyEvent.html

If it's registering to a key, it should show up in there. My keyboard
registered it as the 'standard' keycode 113 - which through some automagic,
ties into the .kl file to key 29 (in Generic.kl).

Since I don't own either of those devices, I can't really test it out, but
I wish you luck!

conne...@googlecode.com

unread,
Aug 19, 2012, 2:47:04 AM8/19/12
to connectbo...@googlegroups.com

Comment #81 on issue 369 by lauren4...@gmail.com: Ctrl, Alt and ESC keys
I'm also trying to solve this problem on the Nexus 7. I tried a couple of
the apks noted above -- but they just land me on a "No host currently
connected" screen and I don't see a way to get out to the normal user@host
specification screen. In fact, even after wiping the data for connectbot
and uninstalling, I'm not getting back to the normal connectbot startup
(tutorial) sequence. My goal is to find the version that solves the
bluetooth hardware keyboard issues, and also works properly without the
bluetooth keyboard. Any clues? Thanks!

conne...@googlecode.com

unread,
Aug 19, 2012, 2:50:04 PM8/19/12
to connectbo...@googlegroups.com

Comment #82 on issue 369 by b...@extrahop.com: Ctrl, Alt and ESC keys not
working on bluetooth keyboard
http://code.google.com/p/connectbot/issues/detail?id=369

not working on bluetooth keyboard

of the apks noted above -- but they just land me on a "No host currently
connected" screen and I don't see a way to get out to the normal
user@hostspecification screen. In fact, even after wiping the data
for connectbot
and uninstalling, I'm not getting back to the normal connectbot startup
(tutorial) sequence. My goal is to find the version that solves the
bluetooth hardware keyboard issues, and also works properly without the
bluetooth keyboard. Any clues? Thanks!

I was in the same boat.

I hurriedly patched the standard (not tablet) brain of the code that I took
off code.google.com and essentially commented out all the special cases
bits that made sense to eliminate. I have no access took my changed source
right now, an vs won't even have Wi-Fi access to send this until tomorrow...

I'm using it with my nexus 7 and a zagg Bluetooth keyboard. (Flex?)
Additionally, I'm using the Android Keyboard Helper Pro, for the purposes
of letting the qwerty keyboard behave as if it dvorak and to assign the
'option' key as an escape key since the keyboard lacks one. (Yes, you could
use ctrl-[ but since I already had the AKHP, i figured I'd use it.)

For the first two days I used my hasty build it was perfect - I wrote a
few thousand lines of code on the airplane, happily ctrl-w'ing between
panes of vim, life was sweet.

Yesterday night, however, ctrl stopped working solo, and I needed to use
shft-ctrl-<char> to have it work properly. No idea why. Maybe related to
AKHP. Who knows.

Anyway, if you want to try an APK built by a stranger who can't even send
you the patch he used, have at it - it's at

http://drowsy.ifokr.org/a.apk

Note: it's the first android app I've compiled, I had to touch java to do
it, and I am sure the key that signs it is gibberish and unrelated to my
actual name. But it does install....

conne...@googlecode.com

unread,
Aug 19, 2012, 2:56:46 PM8/19/12
to connectbo...@googlegroups.com

Comment #83 on issue 369 by lauren4...@gmail.com: Ctrl, Alt and ESC keys
I'll give it a try and report back. My keyboard has ESC (hell, and even
function keys) so I'll just test it straight. Thanks!


conne...@googlecode.com

unread,
Aug 19, 2012, 7:03:49 PM8/19/12
to connectbo...@googlegroups.com

Comment #84 on issue 369 by lauren4...@gmail.com: Ctrl, Alt and ESC keys
Well, the keyboard part of this was looking pretty encouraging, but I
discovered that your test version (a.apk) won't import my standard private
key that has always worked with regular connectbot versions. Getting
the "can't parse private key" error. So something must be different there!

conne...@googlecode.com

unread,
Aug 19, 2012, 7:40:08 PM8/19/12
to connectbo...@googlegroups.com

Comment #85 on issue 369 by b...@extrahop.com: Ctrl, Alt and ESC keys not
Lame diff follows.


diff --git a/src/org/connectbot/service/TerminalKeyListener.java
b/src/org/connectbot/service/TerminalKeyListener.java
index 952f3cd..4897ee4 100644
--- a/src/org/connectbot/service/TerminalKeyListener.java
+++ b/src/org/connectbot/service/TerminalKeyListener.java
@@ -221,20 +221,23 @@ public class TerminalKeyListener implements
OnKeyListener, OnSharedPreferenceCha
metaState &= ~META_CTRL_ON;
bridge.redraw();

+ //BRI seems to not fix !@#$
// If there is no hard keyboard or
there is a hard keyboard currently hidden,
// CTRL-1 through CTRL-9 will send
F1 through F9
- if ((!hardKeyboard || (hardKeyboard
&& hardKeyboardHidden))
- &&
sendFunctionKey(keyCode))
- return true;
+ //if ((!hardKeyboard ||
(hardKeyboard && hardKeyboardHidden))
+ // &&
sendFunctionKey(keyCode))
+ // return true;

key = keyAsControl(key);
}

+
+ //BRI seems to fix !@#$
// handle pressing f-keys
- if ((hardKeyboard && !hardKeyboardHidden)
- && (curMetaState &
KeyEvent.META_SHIFT_ON) != 0
- && sendFunctionKey(keyCode))
- return true;
+ //if ((hardKeyboard && !hardKeyboardHidden)
+ // && (curMetaState &
KeyEvent.META_SHIFT_ON) != 0
+ // && sendFunctionKey(keyCode))
+ // return true;

if (key < 0x80)
bridge.transport.write(key);
@@ -274,46 +277,46 @@ public class TerminalKeyListener implements
OnKeyListener, OnSharedPreferenceCha
if (hardKeyboard && !hardKeyboardHidden &&
event.getRepeatCount() == 0) {
if
(PreferenceConstants.KEYMODE_RIGHT.equals(keymode)) {
- switch (keyCode) {
- case KeyEvent.KEYCODE_ALT_RIGHT:
- metaState |= META_SLASH;
- return true;
- case KeyEvent.KEYCODE_SHIFT_RIGHT:
- metaState |= META_TAB;
- return true;
- case KeyEvent.KEYCODE_SHIFT_LEFT:
- metaPress(META_SHIFT_ON);
- return true;
- case KeyEvent.KEYCODE_ALT_LEFT:
- metaPress(META_ALT_ON);
- return true;
- }
+ //switch (keyCode) {
+ //case KeyEvent.KEYCODE_ALT_RIGHT:
+ // metaState |= META_SLASH;
+ // return true;
+ //case KeyEvent.KEYCODE_SHIFT_RIGHT:
+ // metaState |= META_TAB;
+ // return true;
+ //case KeyEvent.KEYCODE_SHIFT_LEFT:
+ // metaPress(META_SHIFT_ON);
+ // return true;
+ //case KeyEvent.KEYCODE_ALT_LEFT:
+ // metaPress(META_ALT_ON);
+ // return true;
+ //}
} else if
(PreferenceConstants.KEYMODE_LEFT.equals(keymode)) {
- switch (keyCode) {
- case KeyEvent.KEYCODE_ALT_LEFT:
- metaState |= META_SLASH;
- return true;
- case KeyEvent.KEYCODE_SHIFT_LEFT:
- metaState |= META_TAB;
- return true;
- case KeyEvent.KEYCODE_SHIFT_RIGHT:
- metaPress(META_SHIFT_ON);
- return true;
- case KeyEvent.KEYCODE_ALT_RIGHT:
- metaPress(META_ALT_ON);
- return true;
- }
+ //switch (keyCode) {
+ //case KeyEvent.KEYCODE_ALT_LEFT:
+ //metaState |= META_SLASH;
+ //return true;
+ //case KeyEvent.KEYCODE_SHIFT_LEFT:
+ //metaState |= META_TAB;
+ //return true;
+ //case KeyEvent.KEYCODE_SHIFT_RIGHT:
+ //metaPress(META_SHIFT_ON);
+ //return true;
+ //case KeyEvent.KEYCODE_ALT_RIGHT:
+ //metaPress(META_ALT_ON);
+ //return true;
+ //}
} else {
- switch (keyCode) {
- case KeyEvent.KEYCODE_ALT_LEFT:
- case KeyEvent.KEYCODE_ALT_RIGHT:
- metaPress(META_ALT_ON);
- return true;
- case KeyEvent.KEYCODE_SHIFT_LEFT:
- case KeyEvent.KEYCODE_SHIFT_RIGHT:
- metaPress(META_SHIFT_ON);
- return true;
- }
+ //switch (keyCode) {
+ //case KeyEvent.KEYCODE_ALT_LEFT:
+ //case KeyEvent.KEYCODE_ALT_RIGHT:
+ //metaPress(META_ALT_ON);
+ //return true;
+ //case KeyEvent.KEYCODE_SHIFT_LEFT:
+ //case KeyEvent.KEYCODE_SHIFT_RIGHT:
+ //metaPress(META_SHIFT_ON);
+ //return true;
+ //}
}
}

conne...@googlecode.com

unread,
Aug 19, 2012, 7:46:32 PM8/19/12
to connectbo...@googlegroups.com

Comment #86 on issue 369 by lauren4...@gmail.com: Ctrl, Alt and ESC keys
Looks like the "lorantkurthy" version described here works well on the
Nexus 7 and with my Bluetooth keyboard, including control chars, etc.:
http://forum.xda-developers.com/showthread.php?t=1163999 // APK at:
https://github.com/downloads/lorantkurthy/connectbot/ConnectBot.apk is
testing out well. Thanks again!

conne...@googlecode.com

unread,
Oct 2, 2012, 12:38:49 AM10/2/12
to connectbo...@googlegroups.com

Comment #87 on issue 369 by broad...@gmail.com: Ctrl, Alt and ESC keys not
Grr, with both #86's apk, and the earlier ConnectBot-ext-keyboard I have
the same problem on my nexus 7.

If I boot -> launch connectbot -> pair keyboard, it all works.
Control-a/e, esc sends escape (not back), volume keys work. Irssi, screen,
and vim work well.

However if I boot -> pair keyboard -> connectbot it acts like a virtual
keyboard. Control and alt don't work. Esc sends the android back key, etc.

Even if do get it to work, if I do something else and connectbot closes
(because there's not a connection open) I have to reboot to get the
keyboard to work.

I'm using the logitech bluetooth keyboard for "android 3.0+". Anyone have
a solution that works regardless of when you pair the keyboard?

conne...@googlecode.com

unread,
Oct 16, 2012, 6:28:03 PM10/16/12
to connectbo...@googlegroups.com

Comment #88 on issue 369 by ak.hep...@gmail.com: Ctrl, Alt and ESC keys not
Lack of full/correct ctrl/alt/esc support is killin' me.

Tried the "lorantkurthy" per comment 86, and while I get some controls
working? ctrl-u doesn't erase a line. ctrl-w just ends my ssh session
forcefully.

So.. that's not useful at all.

Nexus7 with 4.1.2

conne...@googlecode.com

unread,
Oct 16, 2012, 6:31:35 PM10/16/12
to connectbo...@googlegroups.com

Comment #89 on issue 369 by jimb...@gmail.com: Ctrl, Alt and ESC keys not
ConnectBot seems to be no longer actively developed or supported, based on
the inactivity of the project log.

Other developers have taken ConnectBot, forked it and extended and improved
it though, including the "VX ConnectBot" project which I've found does work
with blue tooth keyboards effectively and still retains the ConnectBot look
and feel.

VX ConnectBot is in the play store, here is the web page of the developer:
http://connectbot.vx.sk/


Reply all
Reply to author
Forward
0 new messages