Does anyone know if there is a way to distinguish whether back key was pressed on the screen or on aphysical keyboard? We have a problem with the ASUS Transformer Prime where the android back key is placed where ESC should be on the physical keyboard, and people expect it to work like ESC.
Share
Turns out events have a
getSource()method.or
The first version of this condition is from the android api. the
(event.getSource() & InputDevice.SOURCE_KEYBOARD) != 0)part.That should do a pretty good job of telling you if the event was from a physical keyboard.