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:
for e := range a.Events() {
switch e := a.Filter(e).(type) {
case key.Event:
log.Println("key event:", e)
}
}
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 the key.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:
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: