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
1 changed files with 16 additions and 6 deletions

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:
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); on_enter(u32_string);
}
break; break;
default: default:
break; break;