]> git.sesse.net Git - vlc/commitdiff
macosx: handle space key by core, used as default setting for play / pause
authorDavid Fuhrmann <david.fuhrmann@googlemail.com>
Tue, 9 Apr 2013 19:53:52 +0000 (21:53 +0200)
committerDavid Fuhrmann <david.fuhrmann@googlemail.com>
Tue, 9 Apr 2013 20:17:37 +0000 (22:17 +0200)
modules/gui/macosx/MainMenu.m
modules/gui/macosx/VideoView.m
modules/gui/macosx/intf.m
src/libvlc-module.c

index 3bfa6e8f487d02e7895cb88708d82d0a12f7d196..72bb19057ecbcc26b31a271edd476ad9ac66342c 100644 (file)
@@ -157,11 +157,7 @@ static VLCMainMenu *_o_sharedInstance = nil;
     [o_mi_quit setKeyEquivalentModifierMask: [o_vlcstringutility VLCModifiersToCocoa:o_key]];
     FREENULL(key);
 
-    key = config_GetPsz(p_intf, "key-play-pause");
-    o_key = [NSString stringWithFormat:@"%s", key];
-    [o_mi_play setKeyEquivalent: [o_vlcstringutility VLCKeyToString: o_key]];
-    [o_mi_play setKeyEquivalentModifierMask: [o_vlcstringutility VLCModifiersToCocoa:o_key]];
-    FREENULL(key);
+    // do not assign play/pause key
 
     key = config_GetPsz(p_intf, "key-stop");
     o_key = [NSString stringWithFormat:@"%s", key];
index 9d32c3907eb5326dbd1d5d8adeab8eef63849aa8..24398ea76ab3271bbffe0d79ebbbea2b0ee581b1 100644 (file)
             else if (key == 'f' && i_pressed_modifiers & NSControlKeyMask && i_pressed_modifiers & NSCommandKeyMask)
                 [[VLCCoreInteraction sharedInstance] toggleFullscreen];
             else if (p_vout) {
-                if (key == ' ')
-                    [[VLCCoreInteraction sharedInstance] playOrPause];
-                else {
-                    val.i_int |= (int)CocoaKeyToVLC(key);
-                    var_Set(p_vout->p_libvlc, "key-pressed", val);
-                }
+                val.i_int |= (int)CocoaKeyToVLC(key);
+                var_Set(p_vout->p_libvlc, "key-pressed", val);
             }
             else
                 msg_Dbg(VLCIntf, "could not send keyevent to VLC core");
index fead1e4d0a14bca00253f25343cf603fe5576cf4..aba366666b541b616b2c99a987b50ab60dff2c93 100644 (file)
@@ -1202,11 +1202,6 @@ static VLCMain *_o_sharedMainInstance = nil;
             }
         }
 
-        if (key == 0x0020) { // space key
-            [[VLCCoreInteraction sharedInstance] playOrPause];
-            return YES;
-        }
-
         val.i_int |= CocoaKeyToVLC(key);
 
         BOOL b_found_key = NO;
index 34a229e929d6fee468465def7f99244046a629ec..912eab14c9adc588174fb7d5df4df5646cec1ed7 100644 (file)
@@ -2146,7 +2146,7 @@ vlc_module_begin ()
  */
 #   define KEY_TOGGLE_FULLSCREEN  "Command+f"
 #   define KEY_LEAVE_FULLSCREEN   "Esc"
-#   define KEY_PLAY_PAUSE         "Command+p"
+#   define KEY_PLAY_PAUSE         "Space"
 #   define KEY_PAUSE              NULL
 #   define KEY_PLAY               NULL
 #   define KEY_FASTER             "Command+="