Bluetooth Keyboard Support

753 views
Skip to first unread message

Dean

unread,
Apr 4, 2010, 6:48:17 PM4/4/10
to iSSH/iX11
For those attempting to use the Apple bluetooth keyboard to it's full
capacity (with arrow keys and all) you'll discover rather quickly that
iSSH does not recognize these keys. This does not match the simulator
behavior with a "simulated hardware keyboard." Arrow keys, ESC,
function keys, etc. all seem to work fine typing using a regular
keyboard into the simulator. However, from a real keyboard to a real
device, key events don't seem to be generated (at all) as they do in
the simulator.

So, after a some research I'm beginning to think there's some
disconnect, either between the iPhone OS or the simulator's
implementation that leads me to believe that the keys are not
supported at all or simply not yet.

I'm going to keep at it but at this point I'm not sure what can be
done. I'll keep everyone posted so watch this space. I'll be posting
something on the website too so I can let people know of this issue.

Rob Alfonso

unread,
Apr 4, 2010, 8:12:04 PM4/4/10
to is...@googlegroups.com
Do we need to start complaining to Apple?

Why would they put the arrows on the keyboard, Apple is usually very
deliberate with their designs.

Thx
Rob

Rob Alfonso, 954pc Inc.
10222 NW 47th Street
(954) 636-2359
Sunrise, FL 33351
r...@954pc.com
http://www.954pc.com

> --
> You received this message because you are subscribed to the Google
> Groups "iSSH/iX11" group.
> To post to this group, send email to is...@googlegroups.com.
> To unsubscribe from this group, send email to issh+uns...@googlegroups.com
> .
> For more options, visit this group at http://groups.google.com/group/issh?hl=en
> .
>

ddvdave

unread,
Apr 5, 2010, 8:01:35 PM4/5/10
to iSSH/iX11
Interestingly the control/arrow keys work in Mail.app (on the iPad at
least), so the iPhone/Pad OS is seeing the events, but something isn't
letting iSSH see the keys.

I have access to Apple's Enterprise support folks, so I could submit
this as an issue, but since the "special keys" work with Mail they
might not be that helpful.

-Dave

Doug DeJulio

unread,
Apr 7, 2010, 10:45:17 AM4/7/10
to iSSH/iX11
I can confirm that Apple's own apps are responding to the control key
combinations. Here's the simplest test to prove it. Bring up the
"Notes" app and place the cursor in the middle of a note. If you
press control-f, the cursor will move forward, and if you press
control-b, the cursor will move backwards. That is, a subset of the
Emacs editing functions works fine. Also, control up-arrow jumps to
the top of the document, and control down-arrow jumps to the bottom,
and tab inserts a tab.

Escape does not do anything, but this doesn't surprise me as a close-
up image of the keyboard dock shows that it does not *have* an escape
key. But it has control and arrow keys, and a tab key.

The best image of the keyboard dock I've found, the only one that let
me read all the key caps clearly, can be found by going to the Apple
store and searching for the keyboard dock, clicking on the thumbnail
for the image of the keyboard alone, and then clicking with the
magnifying lens cursor. You then get an image big enough to read, but
you have to pan it around -- except you can then open that image in
another window. I'd post the URL here, but it's handled by Akamai, so
sharing my own URL with geographically distant people would probably
be non-optimal.

I've been studying it so as to set my expectations reasonably. I am
expecting that eventually all the functions shown on that keyboard
will be fully supported, but I'm not holding out hope for keys that
are conspicuously absent from the keyboard dock, most notably the
"escape" key (I can re-adapt to control-leftbracket, I've had to on
terminals in the past) and the "fn" key.

Some other tests: command-up-arrow also jumps to the top of the
document, and command-down-arrow also jumps to the bottom, but command-
f and command-b do *not* move the cursor forwards and backwards. So
the command key is getting through as well, and is not treated
identically to the control key. The option key behaves as MacOS has
trained me to expect. For example, option-o produces a "ø" character,
option-8 produces a "•" character, option-shift-8 produces a "°"
character, and so on. Even option-n followed by an n produces a "ñ",
by first producing a hovering tilde in a strangely colored box, and
then replacing that glyph with ñ when the n key is hit the second
time.

(Also, the bright/dim keys work, the volume keys, including mute
toggle, work, and the media playback keys work. The "eject" key is
interesting; it toggles the on-screen keyboard, bringing it up or
dismissing it. The exposé and dashboard keys do not do anything at
all.)

Dean

unread,
Apr 7, 2010, 12:55:50 PM4/7/10
to iSSH/iX11
Doug,

This is exactly the frustration I'm dealing with. The UI components
themselves receive the arrow keys and other such commands without an
issue. The problem is that in the simulator, they do make their way
back as key events to my code. On the real device, they're never sent
and I have no way of telling if they were. I think the best solution
for the moment may be to create an efficient keyboard accessory as
requested in another thread. Long term, I will file a support issue
since I figure at least receiving arrow key events will be a common
interest among a lot of apps (not just terminals but games too!) and
if I can capture the meta keys as well, that's just gravy!

Dean

Garibaldi

unread,
Apr 8, 2010, 9:28:35 PM4/8/10
to iSSH/iX11
Hi Dean,

I just plugged in my bluetooth keyboard and fired up iSSH and also
discovered this problem. I hope by talking to Apple you can discover
the reason for the key events not appearing... Maybe its something
fairly simple because I can't imagine that Apple would restrict use of
those keys for their own applications... to what end?

E

unread,
Apr 9, 2010, 11:54:57 AM4/9/10
to iSSH/iX11
Hi Dean,

Just out of curiosity, have you tried out the OS 4 preview? I was
very pleased to see that bluetooth keyboard support was prominently
displayed as a new feature for the phones! I certainly don't want to
wait that long for ctrl support, but it would be some consolation to
know that it will work in the future.

I spent far too long trying to cobble together a solution sacrificing
a normal key using tty settings (not even close) and xmodmap (xterm
only, but still a solution perhaps) but didn't get far. xev indicates
that none of the 'special' key events seem to make it through.

I am also curious what work arounds you have in mind?

Sadly this issue makes my new iPad fail with my primary usage
scenario... remote terminal.

Good luck on this one!

McC

unread,
Apr 10, 2010, 3:45:11 PM4/10/10
to iSSH/iX11
Interestingly, the arrow and control keys are working in
Twitterific... not an Apple app. I hope this can get resolved somehow,
this functionality is high on my list of needs for the iPad.

On Apr 4, 6:48 pm, Dean <canada...@gmail.com> wrote:

McC

unread,
Apr 10, 2010, 3:50:43 PM4/10/10
to iSSH/iX11
Replying to myself...

Oh, Twitterific is probably just using a standard edit field (from
Apple) that is responding to all those keys. iSSH obviously can't be
using a standard edit field. Hmmm... my memory is being jogged by
that. Let me do some research and get back to you.

Dean

unread,
Apr 10, 2010, 3:51:01 PM4/10/10
to iSSH/iX11
Yes, without a doubt the arrow and meta keys are used and acknowledged
in an iPad API supplied component. This doesn't help iSSH much though
because Apple doesn't supply a ready-made terminal window like it does
with text areas or input fields. Even with the new text responder
API's, there's no way to capture anything but (mostly) ASCII key
generation.

Dean

> > something on the website too so I can let people know of this issue.- Hide quoted text -
>
> - Show quoted text -

jeffcovey

unread,
Apr 16, 2010, 10:30:18 AM4/16/10
to iSSH/iX11
Thanks for posting this update on what's happening. Just to give a
little (probably obvious) clarification to the thread subject, this
isn't just to do with Bluetooth keyboards, but with the iPad keyboard
dock as well. As I'm typing this with it in Safari, tab, ctrl, alt/
option, arrow keys, etc. are all working fine.

I just bought iSSH, and was more than disappointed to find this not
working. It's less than half as useful as it should be with these
keys failing. :-\

Hope an Apple software update cleans it up soon!

(Just to be safe: You *have* registered this bug with Apple, Dean?)

Sincerely,
Jeff

Robert Fisher

unread,
Apr 20, 2010, 1:52:31 PM4/20/10
to iSSH/iX11
For what it’s worth, I’ve sent feedback via http://www.apple.com/feedback/ipad.html
asking Apple to address this issue.

Dean: Thanks for iSSH, looking into this issue, and letting us know
the status.

chingon27

unread,
May 2, 2010, 12:01:58 AM5/2/10
to iSSH/iX11

Just another using with the bluetooth keyboard and iPad 3G looking for
the solution. Dean, that's for looking into this. Hopefully it can get
resolved soon. As noted above, I'm sure it's going to be an issue for
many apps. I tried to google for some answers but couldn't find any.
Seems other apps lack the support as well.

Thanks again Dean.

Hoping for a fix soon.

merlin4269

unread,
May 7, 2010, 2:07:01 PM5/7/10
to iSSH/iX11
I'd like to chime in that the story is the same with a Mac USB
keyboard attached via the Camera Connection kit. Alphanumeric, caps
lock, shift all work but arrow keys, fn keys, (other) modifier keys do
not work. Didn't really expect it to be different with the USB
keyboard but figured I'd let you know. Similar to BT keyboard, all
works in Mail.

eugene

unread,
May 7, 2010, 10:09:51 PM5/7/10
to iSSH/iX11
VIM without an escape key is not fun.

I've submitted feedback. I'd urge everyone else who wants this fixed
to do the same.

On Apr 21, 3:52 am, Robert Fisher <geekgui...@gmail.com> wrote:
> For what it’s worth, I’ve sent feedback viahttp://www.apple.com/feedback/ipad.html

Bug Dev

unread,
May 8, 2010, 7:41:07 PM5/8/10
to iSSH/iX11
Has anyone tried to use the iPad keyboard dock? Is the behavior the
same as with a BT keyboard?

On May 7, 10:09 pm, eugene <eug...@noblesamurai.com> wrote:
> VIM without an escape key is not fun.
>
> I've submitted feedback. I'd urge everyone else who wants this fixed
> to do the same.
>

jeffcovey

unread,
May 10, 2010, 1:33:44 PM5/10/10
to iSSH/iX11
On May 8, 7:41 pm, Bug Dev <devmr...@gmail.com> wrote:

> Has anyone tried to use the iPad keyboard dock? Is the behavior the
> same as with a BT keyboard?

Yes, see my post earlier in the thread.

Thanks,
Jeff

Bug Dev

unread,
May 11, 2010, 12:02:14 PM5/11/10
to iSSH/iX11
Oops! Didn't realize that you said that you tried it with BOTH. I read
that slightly incorrectly...

This definitely seems like a problem with the API (or at least the
allowable calls).

Hank

unread,
May 14, 2010, 2:07:22 AM5/14/10
to iSSH/iX11
I just tested my bluetooth keyboard in the iPad FROTZ application and
the right and left arrow keys worked fine. As far as I can tell, Input
was not using an iPad API provided component. FROTZ is an emulator for
old text based games like Zork and looks just like a standard command
line interface.

Dean

unread,
May 14, 2010, 2:21:47 AM5/14/10
to iSSH/iX11
I wish this were some sort of good news. I can assure you this is an
iPad API provided component. Notice how it doesn't wrap the text
until after you submit a command? This is actually something pretty
easy to do. They're just putting a text field on the page where it
needs input and then moving it to the next input line when done.

Unfortunately this trick doesn't work for a terminal emulator because
the cursor can be anywhere, not just the last line of text on a
screen. It's worth pointing out that up and down arrow keys don't
work in FROTZ either as it's a single line text entry field.

It is worth pointing out that I have an internal version that uses the
BT and dock keyboard just fine, with all key inputs working as
expected. The problem is that I had to use private API stuff to do it
and that won't get past review. It's a start though and eventually
I'll find a way. :-)

Dean

Sean McCune

unread,
May 14, 2010, 3:18:59 AM5/14/10
to is...@googlegroups.com

Did you submit this private API to radar so they know that someone wants to use it for a useful purpose? They definitely take radar submissions about private APIs into account when prioritizing what, if and when a private API is "publicized".

McC

Dean

unread,
May 14, 2010, 3:38:14 AM5/14/10
to iSSH/iX11
You're right in that I should probably update my bug report. I'm
fairly pessimistic however, as this involves the application UIEvent
stuff, where the vast majority of events are hidden in a
UIInternalEvent which is opaque to kosher third-party iPhone apps.

Dean

Doug DeJulio

unread,
May 14, 2010, 11:39:37 AM5/14/10
to iSSH/iX11
FWIW, I wrote up a fairly extensive request for access to the keyboard
UIEvent stuff, or a couple of other alternative ways to do the same
job (in my "notes" section, including specific use-cases), as radar
issue 7959010. It was tagged as a duplicate of issue 7649186. A
bunch of us are requesting this functionality (though more would
always help illustrate the demand level).

Hank

unread,
May 17, 2010, 8:07:02 AM5/17/10
to iSSH/iX11


On May 14, 12:21 am, Dean <canada...@gmail.com> wrote:
> I wish this were some sort of good news.  I can assure you this is an
> iPad API provided component.  Notice how it doesn't wrap the text
> until after you submit a command?  This is actually something pretty
> easy to do.  They're just putting a text field on the page where it
> needs input and then moving it to the next input line when done.

I stand corrected. I now believe you that FROTZ is using an API
component.

> Unfortunately this trick doesn't work for a terminal emulator because
> the cursor can be anywhere, not just the last line of text on a
> screen.  It's worth pointing out that up and down arrow keys don't
> work in FROTZ either as it's a single line text entry field.

For 90% of what I do, just having the cursor on the last line would be
ok (assuming the up arrow would recall previous commands, which FROTZ
does not do), but I do see your point.

In...@wesleyacoustics.com

unread,
Jun 2, 2010, 7:09:51 PM6/2/10
to iSSH/iX11
Have you looked at the Jump terminal services app? They have arrow
(but not meta) keys working in their app and seemed to have similar
problems to start out. Not sure if they'd be willing to share their
approach if they had something figured out or not.

Dean

unread,
Jun 3, 2010, 2:00:24 AM6/3/10
to iSSH/iX11
Not just arrow keys but CTRL-A, CTRL-C, and tab and shift tab. Given
what's allowed and what's not, I have a pretty good idea what's going
on behind the scenes. They've definitely put some brute force into
it, that's for certain.

Dean

On Jun 2, 4:09 pm, "I...@wesleyacoustics.com"

Kijun

unread,
Jun 4, 2010, 7:47:31 PM6/4/10
to iSSH/iX11

Hey Dean,

First of all, I want to thank you for all the wonderful work you are
doing with iSSH.
Have you tried looking into BTStack Keyboard from Cydia?
I bought iSSH, then I realized that iSSH shouldn't be able to
recognize esc and arrows so I bought BTStack keyboard, which does
recognize esc + ctrl + arrow keys. But it still doesn't work because
(I think) iSSH does not map the inputs from BTStack.
It would be really nice if you could make it work :)

Mike Proctor

unread,
Jun 14, 2010, 3:25:10 PM6/14/10
to iSSH/iX11
Is somebody still looking at this? External keyboards are about
worthless using ssh.

Jeff Schoby

unread,
Jun 14, 2010, 8:57:18 PM6/14/10
to is...@googlegroups.com
I think you may be exaggerating there a bit. Meta, function, and arrow keys are not functional via an external keyboard, but it doesn't make an external keyboard useless. My Bluetooth keyboard is far from useless. For one, you don't have the virtual keyboard taking up valuable screen real estate...big plus in my book.

Sent from my iPad

Mike Proctor

unread,
Jun 15, 2010, 1:52:44 PM6/15/10
to iSSH/iX11
ok, maybe not useless but for editing in vi or emacs it's easier to
use the on screen keyboard then going back and fourth with the
external. So does that mean this isn't going to be fixed at some
point?

On Jun 14, 8:57 pm, Jeff Schoby <ssrj...@gmail.com> wrote:
> I think you may be exaggerating there a bit.  Meta, function, and arrow keys are not functional via an external keyboard, but it doesn't make an external keyboard useless.  My Bluetooth keyboard is far from useless.  For one, you don't have the virtual keyboard taking up valuable screen real estate...big plus in my book.
>
> Sent from my iPad
>

Jeff Schoby

unread,
Jun 15, 2010, 1:57:51 PM6/15/10
to is...@googlegroups.com
I disagree when it comes to vi...you only really need one hand to reach up for the virtual esc key...and isn't that big of a deal.   Emacs, yeah, that would get annoying quickly.



-- Sent from my Palm Pre


Dan VanWinkle

unread,
Jun 15, 2010, 2:11:52 PM6/15/10
to is...@googlegroups.com
Considering that this is a problem with Apples SDK, I think you need to talk to them. Dean will have it working within days of Apple fixing the problem...

Dan

Sent from my iPhone

spTim

unread,
Jun 22, 2010, 8:48:04 AM6/22/10
to iSSH/iX11
Hi,

just figured out that in pterm the TAB key from the BT Keyboard works
as expected. The other ones (Cursor, Esc, CTRL, ...) get lost, too.

Tim

Dean

unread,
Jun 22, 2010, 12:59:56 PM6/22/10
to iSSH/iX11
Yeah, Jump is grabbing the international and mathematical characters
like ƒ and and å to interpret as ALT+F and ALT+A, respectively, for
example. This doesn't work well as I have a significant international
user base and I hear Germans really like their umlauts. Using screen,
as demonstrated in the BT Keyboard workaround thread, one can map
these keys as you see fit to do some of the key combinations you're
looking for.

Dean

On Jun 2, 4:09 pm, "I...@wesleyacoustics.com"
<I...@wesleyacoustics.com> wrote:

Aaron

unread,
Jul 7, 2010, 10:01:19 AM7/7/10
to iSSH/iX11
Thanks for looking into this issue, Dean, even if there's no good
solution.

I think I already know the answer, but has this become possible in iOS
4?

And while I'm here: perhaps some intrepid developer could write a
MobileSubstrate plugin to convert the private API keyboard events into
the events that show up in the simulator. That is, if that code path
is still there.

David Leimbach

unread,
Jul 15, 2010, 3:08:03 PM7/15/10
to iSSH/iX11

Anyone notice a difference with iOS 3.2.1 that's out today?

Dean

unread,
Jul 15, 2010, 4:03:55 PM7/15/10
to iSSH/iX11
No, normally minor sub-versions like these contain no API differences,
which is what we're shooting for if BT keyboards are going to work.

There is, however, a 4.1 beta that's been made available to
developers. Unfortunately, I've already gone through the API
differences and there's no such luck at this point.

Dean

David Leimbach

unread,
Jul 15, 2010, 4:30:28 PM7/15/10
to iSSH/iX11


On Jul 15, 1:03 pm, Dean <canada...@gmail.com> wrote:
> No, normally minor sub-versions like these contain no API differences,
> which is what we're shooting for if BT keyboards are going to work.
>

I guess I was wondering if it was an API problem or API implementation
problem.

Doug DeJulio

unread,
Sep 9, 2010, 8:59:00 PM9/9/10
to iSSH/iX11
Psst.... *something* just changed. "Documents to Go" just pushed out
an update of their app that claims to add "full keyboard support", and
I can confirm that the arrow keys on my bluetooth keyboard are now
suddenly working properly in their word processor. I'm going to
investigate further, but there's *something* exciting going on here.

Doug DeJulio

unread,
Sep 9, 2010, 9:19:02 PM9/9/10
to iSSH/iX11
Further testing: while the arrow keys work, the next most likely key
combinations I'd expect them to get working in a word processor
(command-i for "italicize this text" and command-b for "boldificate
this text") do not work. So I guess there's some cause for optimism,
but not ecstatic jubilation yet.

Doug DeJulio

unread,
Sep 10, 2010, 4:08:03 PM9/10/10
to iSSH/iX11
And after further testing, I can confirm what we were all probably
assuming: a USB keyboard connected through the camera connection kit
behaves identically. Arrow keys work fine.
Reply all
Reply to author
Forward
0 new messages