jquery/jquery-mobile — Issue #2831: Android: No Key-up event for KeyCode 66 on input
Author: JonSmart
Created: 2011-10-25 11:31:40+00:00
State: open

I am using the latest Release Candidate RC2, I have a simple Input box of type search, I bind to both the submit of the form and the keyup of the input box. Within the keyup function I simply look for a key code of 13 or 66 (66 = Android Enter Key). I receive events for any key's pressed except the enterkey. The follow log is taken from LogCat, my function simple calls console.log('JS KEY PRESS DETECTED: ' + KeyCode) when receiving an event, you can see the OS log fires the event but the function is called when entering the character 'a' but not for the KeyCode 66:

10-25 12:05:10.439: INFO/InputReader(162): dispatchTouch::touch event's action is 1
10-25 12:05:10.439: INFO/InputDispatcher(162): Delivering touch to current input target: action: 1, channel '409852b8 InputMethod (server)'
10-25 12:05:10.469: INFO/browser(929): Console: JS KEY PRESS DETECTED: 65 :6404841
10-25 12:05:10.469: VERBOSE/browser(929): BrowserActivity.onKeyUp: keyCode = 29 event.getRepeatCount()=0 event.isTracking()=false event.isCanceled()=false
10-25 12:05:10.479: VERBOSE/AudioPolicyManager(95): stopOutput() output 1, stream 1, session 445
10-25 12:05:10.479: VERBOSE/AudioPolicyManager(95): getNewDevice() selected device 0
10-25 12:05:10.479: VERBOSE/AudioPolicyManager(95): getNewDevice() selected device 0
10-25 12:05:10.479: VERBOSE/AudioPolicyManager(95): setOutputDevice() output 1 device 0 delayMs 150
10-25 12:05:10.479: VERBOSE/AudioPolicyManager(95): setOutputDevice() setting same device 0 or null device for output 1
10-25 12:05:11.239: INFO/InputReader(162): dispatchTouch::touch event's action is 0
10-25 12:05:11.239: INFO/InputDispatcher(162): Delivering touch to current input target: action: 0, channel '409852b8 InputMethod (server)'
10-25 12:05:11.239: VERBOSE/AudioPolicyManager(95): startOutput() output 1, stream 1, session 446
10-25 12:05:11.239: VERBOSE/AudioPolicyManager(95): getDeviceForStrategy() from cache strategy 0, device 2
10-25 12:05:11.239: VERBOSE/AudioPolicyManager(95): getNewDevice() selected device 2
10-25 12:05:11.239: VERBOSE/AudioPolicyManager(95): setOutputDevice() output 1 device 2 delayMs 0
10-25 12:05:11.239: VERBOSE/AudioPolicyManager(95): setOutputDevice() setting same device 2 or null device for output 1
10-25 12:05:11.239: VERBOSE/AudioPolicyManager(95): releaseOutput() 1
10-25 12:05:11.259: DEBUG/BatteryService(162): update start
10-25 12:05:11.259: DEBUG/BatteryService(162): update start
10-25 12:05:11.259: DEBUG/BatteryService(162): update start
10-25 12:05:11.299: INFO/InputReader(162): dispatchTouch::touch event's action is 1
10-25 12:05:11.299: INFO/InputDispatcher(162): Delivering touch to current input target: action: 1, channel '409852b8 InputMethod (server)'
10-25 12:05:11.309: VERBOSE/browser(929): BrowserActivity.onKeyUp: keyCode = 66 event.getRepeatCount()=0 event.isTracking()=false event.isCanceled()=false
10-25 12:05:11.319: VERBOSE/AudioPolicyManager(95): stopOutput() output 1, stream 1, session 446
10-25 12:05:11.319: VERBOSE/AudioPolicyManager(95): getNewDevice() selected device 0
10-25 12:05:11.319: VERBOSE/AudioPolicyManager(95): getNewDevice() selected device 0
10-25 12:05:11.319: VERBOSE/AudioPolicyManager(95): setOutputDevice() output 1 device 0 delayMs 150
10-25 12:05:11.319: VERBOSE/AudioPolicyManager(95): setOutputDevice() setting same device 0 or null device for output 1

Hope this makes sense, this is my first bug submission so if you need more info please ask.