[vlc-commits] macosx: handle the space key correctly for play/pause toggling

Felix Paul Kühne git at videolan.org
Sat Nov 12 18:42:18 CET 2011


vlc | branch: master | Felix Paul Kühne <fkuehne at videolan.org> | Sat Nov 12 18:42:13 2011 +0100| [91c2e63a0c84560a7faac1785602707f0f73a405] | committer: Felix Paul Kühne

macosx: handle the space key correctly for play/pause toggling

fixes #5508

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=91c2e63a0c84560a7faac1785602707f0f73a405
---

 modules/gui/macosx/intf.m |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/modules/gui/macosx/intf.m b/modules/gui/macosx/intf.m
index 21bf9d6..feb4294 100644
--- a/modules/gui/macosx/intf.m
+++ b/modules/gui/macosx/intf.m
@@ -1277,6 +1277,12 @@ unsigned int CocoaKeyToVLC( unichar i_key )
             return NO;
     }
 
+    if( key == 0x0020 ) // space key
+    {
+        [[VLCCoreInteraction sharedInstance] play];
+        return YES;
+    }
+
     val.i_int |= CocoaKeyToVLC( key );
 
     if( [o_usedHotkeys indexOfObject: tempString] != NSNotFound || [o_usedHotkeys indexOfObject: tempStringPlus] != NSNotFound )



More information about the vlc-commits mailing list