]> git.sesse.net Git - vlc/commitdiff
* when the playlist is selected and you push the spacebar we pause/play
authorDerk-Jan Hartman <hartman@videolan.org>
Fri, 24 Jan 2003 02:31:53 +0000 (02:31 +0000)
committerDerk-Jan Hartman <hartman@videolan.org>
Fri, 24 Jan 2003 02:31:53 +0000 (02:31 +0000)
  the movie. this makes the behaviour more consistent, though the solution
  is somewhat unclean. We should fix this on a higher level but i don't see
  how we could/should.

modules/gui/macosx/playlist.m

index 390766725659c1b56df5ea4a5d99b04dd16f8dfa..7ecc360559d7306d70332549566a89fb3be4e495 100644 (file)
@@ -2,7 +2,7 @@
  * playlist.m: MacOS X interface plugin
  *****************************************************************************
  * Copyright (C) 2002 VideoLAN
- * $Id: playlist.m,v 1.4 2003/01/20 03:45:06 hartman Exp $
+ * $Id: playlist.m,v 1.5 2003/01/24 02:31:53 hartman Exp $
  *
  * Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
  *
     return( [[self delegate] menuForEvent: o_event] );
 }
 
+- (void)keyDown:(NSEvent *)o_event
+{
+    intf_thread_t * p_intf = [NSApp getIntf];
+    unichar key = 0;
+
+    if( [[o_event characters] length] )
+    {
+        key = [[o_event characters] characterAtIndex: 0];
+    }
+
+    switch( key )
+    {
+        case ' ':
+            input_SetStatus(  p_intf->p_sys->p_input , INPUT_STATUS_PAUSE );
+            break;
+
+        default:
+            [super keyDown: o_event];
+            break;
+    }
+}
+
 @end
 
 /*****************************************************************************