1
0
mirror of https://github.com/RPCS3/rpcs3.git synced 2024-11-22 10:42:36 +01:00

OSK/overlays: handle keyboard enter and escape

This commit is contained in:
Megamouse 2022-04-25 19:17:33 +02:00
parent 8f14f392fd
commit ff7636ea01

View File

@ -681,18 +681,28 @@ namespace rsx
} }
// Handle special input // Handle special input
if (!found_key && !out_key_string.empty()) if (!found_key)
{ {
switch (out_key_string[0]) switch (out_key_code)
{ {
case ' ': case CELL_KEYC_SPACE:
on_space(u32_string); on_space(u32_string);
break; break;
case '\b': case CELL_KEYC_BS:
on_backspace(u32_string); on_backspace(u32_string);
break; break;
case '\n': case CELL_KEYC_ESCAPE:
on_enter(u32_string); Close(CELL_OSKDIALOG_CLOSE_CANCEL);
break;
case CELL_KEYC_ENTER:
if ((flags & CELL_OSKDIALOG_NO_RETURN))
{
Close(CELL_OSKDIALOG_CLOSE_CONFIRM);
}
else
{
on_enter(u32_string);
}
break; break;
default: default:
break; break;