diff options
Diffstat (limited to 'hw/xquartz/darwinEvents.c')
-rw-r--r-- | hw/xquartz/darwinEvents.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/hw/xquartz/darwinEvents.c b/hw/xquartz/darwinEvents.c index 7fc390d1e..37f0bfb45 100644 --- a/hw/xquartz/darwinEvents.c +++ b/hw/xquartz/darwinEvents.c @@ -146,7 +146,6 @@ static void DarwinPressModifierKey(int pressed, int key) { */ static int modifier_mask_list[] = { - NX_SECONDARYFNMASK, NX_NUMERICPADMASK, NX_HELPMASK, #ifdef NX_DEVICELCMDKEYMASK NX_DEVICELCTLKEYMASK, NX_DEVICERCTLKEYMASK, NX_DEVICELSHIFTKEYMASK, NX_DEVICERSHIFTKEYMASK, @@ -163,6 +162,7 @@ static void DarwinUpdateModifiers( int flags ) // modifier flags that have changed { int *f; + int key; /* Capslock is special. This mask is the state of capslock (on/off), * not the state of the button. Hopefully we can find a better solution. @@ -173,8 +173,13 @@ static void DarwinUpdateModifiers( } for(f=modifier_mask_list; *f; f++) - if(*f & flags) - DarwinPressModifierKey(pressed, DarwinModifierNXMaskToNXKey(*f)); + if(*f & flags) { + key = DarwinModifierNXMaskToNXKey(*f); + if(key == -1) + ErrorF("DarwinUpdateModifiers: Unsupported NXMask: 0x%x\n", *f); + else + DarwinPressModifierKey(pressed, key); + } } /* Generic handler for Xquartz-specifc events. When possible, these should |