mirror of
https://github.com/libretro/RetroArch.git
synced 2025-02-02 23:14:34 +00:00
(x11) Set RETROKMOD_NUMLOCK on keypad-triggered key events
This commit is contained in:
parent
0e467f99ed
commit
6c3bf5c27e
@ -85,14 +85,13 @@ void x11_handle_key_event(XEvent *event, XIC ic, bool filter)
|
||||
char keybuf[32] = {0};
|
||||
uint32_t chars[32] = {0};
|
||||
|
||||
bool down = event->type == KeyPress;
|
||||
unsigned key = input_keymaps_translate_keysym_to_rk(XLookupKeysym(&event->xkey, 0));
|
||||
int num = 0;
|
||||
bool down = event->type == KeyPress;
|
||||
unsigned key = input_keymaps_translate_keysym_to_rk(XLookupKeysym(&event->xkey, 0));
|
||||
int num = 0;
|
||||
KeySym keysym = 0;
|
||||
|
||||
if (down && !filter)
|
||||
{
|
||||
KeySym keysym = 0;
|
||||
|
||||
#ifdef X_HAVE_UTF8_STRING
|
||||
Status status = 0;
|
||||
|
||||
@ -124,6 +123,8 @@ void x11_handle_key_event(XEvent *event, XIC ic, bool filter)
|
||||
mod |= RETROKMOD_ALT;
|
||||
if (state & Mod4Mask)
|
||||
mod |= RETROKMOD_META;
|
||||
if (IsKeypadKey(keysym))
|
||||
mod |= RETROKMOD_NUMLOCK;
|
||||
|
||||
input_keyboard_event(down, key, chars[0], mod, RETRO_DEVICE_KEYBOARD);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user