summaryrefslogtreecommitdiffstats
path: root/libvo/vo_corevideo.m
diff options
context:
space:
mode:
Diffstat (limited to 'libvo/vo_corevideo.m')
-rw-r--r--libvo/vo_corevideo.m13
1 files changed, 11 insertions, 2 deletions
diff --git a/libvo/vo_corevideo.m b/libvo/vo_corevideo.m
index a964de7e57..1effb449f3 100644
--- a/libvo/vo_corevideo.m
+++ b/libvo/vo_corevideo.m
@@ -935,8 +935,17 @@ static int control(uint32_t request, void *data)
- (void) keyDown: (NSEvent *) theEvent
{
int key = convert_key([theEvent keyCode], *[[theEvent characters] UTF8String]);
- if (key != -1)
- mplayer_put_key(key);
+ if (key != -1) {
+ if([theEvent modifierFlags] & NSShiftKeyMask)
+ key |= KEY_MODIFIER_SHIFT;
+ if([theEvent modifierFlags] & NSControlKeyMask)
+ key |= KEY_MODIFIER_CTRL;
+ if([theEvent modifierFlags] & NSAlternateKeyMask)
+ key |= KEY_MODIFIER_ALT;
+ if([theEvent modifierFlags] & NSCommandKeyMask)
+ key |= KEY_MODIFIER_META;
+ mplayer_put_key(key);
+ }
}
/*