rust-mobile/android-activity

Use common `Keycode` type across backends

rib opened this issue · 1 comments

rib commented

There's a notable portability hazard currently due to the game-activity and native-activity backends exposing different Keycode types.

For example rust-windowing/winit@9184309#diff-9169a22d6397a250be741006cd857b8a575f804c74cc07e3a4fb8f3341606d9b and rust-windowing/winit@4a36741 both recently assumed they could use the ndk::event::Keycode type which inadvertently broke building Winit against the game-activity backend.

We should either use ndk::event::Keycode in both backends or move the current game-activity Keycode type so it can be shared.

Also relates to #45

Perhaps also relates to #48 when considering reusing ndk types that look/feel too similar to their game-activity counterpart.

We could even rewrite parts of the C code to make them similar if desired.