File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -809,6 +809,7 @@ void wl_keyboard_handle_key_webos(void *data,
809809 int value = (state == WL_KEYBOARD_KEY_STATE_PRESSED ) ? 1 : 0 ;
810810 gfx_ctx_wayland_data_t * wl = (gfx_ctx_wayland_data_t * )data ;
811811 uint32_t keysym = key ;
812+ input_driver_state_t * input_st = input_state_get_ptr ();
812813
813814 /* Handle 'duplicate' inputs that correspond
814815 * to the same RETROK_* key */
@@ -830,6 +831,12 @@ void wl_keyboard_handle_key_webos(void *data,
830831 case KEY_WAYLAND_WEBOS_BLUE :
831832 keysym = KEY_A ;
832833 break ;
834+ case KEY_ENTER :
835+ /* When in menu and in virtual keyboard entry,
836+ * map magic remote wheel button click to LCTRL for character selection */
837+ if (input_st && (input_st -> flags & INP_FLAG_KB_MAPPING_BLOCKED ))
838+ keysym = KEY_LEFTCTRL ;
839+ break ;
833840 case KEY_OK :
834841 case KEY_SELECT :
835842 keysym = KEY_ENTER ;
Original file line number Diff line number Diff line change @@ -466,6 +466,9 @@ static void sdl_input_poll(void *data)
466466 unsigned code = input_keymaps_translate_keysym_to_rk (
467467 event .key .keysym .sym );
468468#ifdef WEBOS
469+ input_driver_state_t * input_st = input_state_get_ptr ();
470+ bool osk_active = input_st && (input_st -> flags & INP_FLAG_KB_MAPPING_BLOCKED );
471+
469472 switch ((int ) event .key .keysym .scancode )
470473 {
471474 case SDL_WEBOS_SCANCODE_BACK :
@@ -489,6 +492,14 @@ static void sdl_input_poll(void *data)
489492 case SDL_WEBOS_SCANCODE_EXIT :
490493 code = RETROK_F1 ;
491494 break ;
495+ case SDL_SCANCODE_RIGHT :
496+ case SDL_SCANCODE_LEFT :
497+ case SDL_SCANCODE_DOWN :
498+ case SDL_SCANCODE_UP :
499+ /* navigation only, skip text insertion */
500+ if (osk_active )
501+ return ;
502+ break ;
492503 default :
493504 break ;
494505 }
You can’t perform that action at this time.
0 commit comments