x/mobile: Can't get the Back key event on Android #26985
Labels
Milestone
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
go version
)?go version go1.8.1 darwin/amd64
Does this issue reproduce with the latest release?
YES
What did you do?
Add following code in the basic example:
Build and Run the basic example on an Android devices.
What did you expect to see?
Print the correct key code value (BacK == 4 on Android).
What did you see instead?
It prints 'KeyCodeUnknown'. It seems that in the 'android.go', there is a filter method
convAndroidKeyCode
which map the Back key as unknown. I think gomobile should properly process the keycode such as Back. On Android, Menu/Back are commonly used keycode. Maybe we can add a 'Origin' field in thekey.Event
struct, that I can get the original (no filtered) value.PS: unity map the 'Back' key on Android to ESC.
The text was updated successfully, but these errors were encountered: