[Vm-dev] iOS VM and external bluetooth keyboard: it works!

phil at highoctane.be phil at highoctane.be
Sat Mar 2 22:33:31 UTC 2013


Got the external bluetooth keyboard thing working.

I learned very interesting stuff about the iOS VM in the process and
took a lot of notes.
I hope to find some time for putting them into the VM book.

Some considerations:

As I do overload sendEvent: in my own UIApplication, this isn't going
to be okay for an AppStore app. I'll have to find another way to do
that. But if what I want is a user to just do encoding of fields, I
can revert to the former way of inputting text.
There seems to be a framework for using the external bluetooth stuff
but it looks like complicated for my current understanding.

The things that are in the event captured in my own UIApplication
class is that I do get raw keycodes, which do require translation to
the proper characters. So, it works with my own little translation
table in the Objective-C code for my own keyboard layout.
Also, I do have all modifiers as bits, which is nice. Left-Shift-A
isn't Right-Shit-A, same for Cmd- etc. This opens some possibilities.

I am sending the event to the squeak vm on KEYUP but I can also get
KEYDOWN and the char itself. Not sure what's best for Squeak/Pharo in
the image. If someone can tell me, it would be great.

I am now finishing up my mapping table and will try to get a workspace
performing a doIt with Cmd-D!

Keybindings will be useful for sure...

Phil


More information about the Vm-dev mailing list