input: support skip in keyboard definition (for pseudo-keyboard devices).

This commit is contained in:
sorgelig
2020-06-30 03:59:18 +08:00
parent 4bfd1378a3
commit 7b2e25404a
2 changed files with 3 additions and 3 deletions

View File

@@ -1698,7 +1698,7 @@ static void input_cb(struct input_event *ev, struct input_absinfo *absinfo, int
if (ev->type == EV_KEY && mapping && mapping_type == 3 && ev->code == input[dev].mmap[SYS_BTN_OSD_KTGL + 1]) ev->code = KEY_ENTER;
int map_skip = (ev->type == EV_KEY && ev->code == KEY_SPACE && ((mapping_dev >= 0 && mapping_type==1) || mapping_button<0));
int map_skip = (ev->type == EV_KEY && ((ev->code == KEY_SPACE && mapping_type == 1) || ev->code == KEY_ALTERASE) && (mapping_dev >= 0 || mapping_button<0));
int cancel = (ev->type == EV_KEY && ev->code == KEY_ESC);
int enter = (ev->type == EV_KEY && ev->code == KEY_ENTER);
int origcode = ev->code;

View File

@@ -556,7 +556,7 @@ static uint32_t menu_key_get(void)
{
if (get_map_vid() || get_map_pid())
{
send_map_cmd(KEY_SPACE);
send_map_cmd(KEY_ALTERASE);
}
}
}
@@ -2999,7 +2999,7 @@ void HandleUI(void)
sprintf(s, " %s ID: %04x:%04x", get_map_type() ? "Joystick" : "Keyboard", get_map_vid(), get_map_pid());
if (get_map_button() > 0 || !joymap_first)
{
OsdWrite(7, (get_map_type() && !is_menu()) ? " Space/Menu \x16 Undefine" : " Space \x16 Undefine");
OsdWrite(7, (get_map_type() && !is_menu()) ? " User/Menu \x16 Undefine" : " User \x16 Undefine");
if (!get_map_type()) OsdWrite(9);
}
OsdWrite(5, s);