Bill Michaelson wrote:
>> I'd like to use an external keyboard.  I have a Freedom Pro Bluetooth
>> keyboard that can send keystroke info to Android applications.  I am
>> supposing that I can use InputMethodManager and associated framework
>> to accomplish this, but I'm unsure whether it will be effective and
>> useful.

Well, the "real answer" is for Android to have Bluetooth support for
keyboards. I am skeptical that you can fake this out at the SDK level,
but I'm not a Bluetooth expert.

>> In particular, I would like to use the connectbot application, and it
>> would be extremely useful to receive keystrokes for ctl-c, ctl-d,
>> etc.  That application currently uses a hack approach involving the
>> trackball to input ctl-keys.

That is because Android doesn't have "ctl-keys".

>> In my very superficial review of the Input Method Framework, I think I
>> see that one could generate KeyEvent objects to send to the
>> applications.  But these are apparently raw key events, and the data
>> domain of what can be sent does not seem to include regular-old byte
>> values or sequences like 0x03 (for ctl-c as an example), but rather,
>> physical keypresses. 

They certainly aren't classic PC keycodes, if that's what you mean. The
only "meta" keys on Android are ALT (possibly left or right), SHIFT
(possibly left or right), and SYM (which I don't know if I've ever seen
on a device). There is no CTRL; hence, ConnectBot can't reasonably
expect to see one.

Assuming you pull off the improbable and find a way to, at the SDK
level, convert your Bluetooth keyboard into something that responds like
an input method editor, just map your CTRL keys to be
KEYCODE_DPAD_CENTER or whatever ConnectBot is looking for.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://twitter.com/commonsguy

Android Training in NYC: 1-2 May 2010: http://guruloft.com

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to