Thursday, December 13, 2012

[android-developers] onKeyUp, onKeyDown no longer being sent to Views?

We have hit a serious roadblock in our application, which provides remote connectivity to Windows desktops.  We have a view that renders a remote server desktop and allows the user to interact with the server desktop using the software keyboard and by tapping on the screen.

With the recent rollout of Android 4.1 and 4.2 we have hit a situation whereby key events that were being sent to our View are no longer being sent. It would appear that there has been a corresponding documentation change in the Android SDK that now contains this:

Key presses in software keyboards will generally NOT trigger this listener, although some may elect to do so in some situations. Do not rely on this to catch software key presses.


We absolutely rely on the fact that when you press a key on the software keyboard you get an onKeyUp and onKeyDown events for that View class. The reason being that we require the unicode value and key event that is contained in the input keystroke.

Is there anyway to work around this? And second what is Google thinking in breaking functionality like this? If you look at the docs from ICS and before this limitation was not present, but since ICS it now is.  And what is worse is that an upgrade of the Nexus 7 to 4.2 totally breaks functionality that was reliant on the previously documented behaviour.

Our requirements are that we require the raw key events from the software keyboard (I mean come on who uses a hardware keyboard with an android device!) including the unicode characters (where appropriate) and the actual KeyEvent data.

--
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+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

No comments:

Post a Comment