Map numpad ENTER key

Forward numpad ENTER key to the device.

Fixes <https://github.com/Genymobile/scrcpy/issues/117>.
This commit is contained in:
Romain Vimont 2018-04-08 12:38:06 +02:00
parent f8ad7df3be
commit 9aa88b6fc3

View file

@ -73,6 +73,7 @@ static enum android_metastate convert_meta_state(SDL_Keymod mod) {
static SDL_bool convert_keycode(SDL_Keycode from, enum android_keycode *to) { static SDL_bool convert_keycode(SDL_Keycode from, enum android_keycode *to) {
switch (from) { switch (from) {
MAP(SDLK_RETURN, AKEYCODE_ENTER); MAP(SDLK_RETURN, AKEYCODE_ENTER);
MAP(SDLK_KP_ENTER, AKEYCODE_NUMPAD_ENTER);
MAP(SDLK_ESCAPE, AKEYCODE_ESCAPE); MAP(SDLK_ESCAPE, AKEYCODE_ESCAPE);
MAP(SDLK_BACKSPACE, AKEYCODE_DEL); MAP(SDLK_BACKSPACE, AKEYCODE_DEL);
MAP(SDLK_TAB, AKEYCODE_TAB); MAP(SDLK_TAB, AKEYCODE_TAB);