[vlc-commits] macosx: handle space key by core, used as default setting for play / pause
David Fuhrmann
git at videolan.org
Tue Apr 9 22:17:49 CEST 2013
vlc | branch: master | David Fuhrmann <david.fuhrmann at googlemail.com> | Tue Apr 9 21:53:52 2013 +0200| [f95c2c87f9d74bdd9a9f6a5ae5903cdf92256619] | committer: David Fuhrmann
macosx: handle space key by core, used as default setting for play / pause
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=f95c2c87f9d74bdd9a9f6a5ae5903cdf92256619
---
modules/gui/macosx/MainMenu.m | 6 +-----
modules/gui/macosx/VideoView.m | 8 ++------
modules/gui/macosx/intf.m | 5 -----
src/libvlc-module.c | 2 +-
4 files changed, 4 insertions(+), 17 deletions(-)
diff --git a/modules/gui/macosx/MainMenu.m b/modules/gui/macosx/MainMenu.m
index 3bfa6e8..72bb190 100644
--- a/modules/gui/macosx/MainMenu.m
+++ b/modules/gui/macosx/MainMenu.m
@@ -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];
diff --git a/modules/gui/macosx/VideoView.m b/modules/gui/macosx/VideoView.m
index 9d32c39..24398ea 100644
--- a/modules/gui/macosx/VideoView.m
+++ b/modules/gui/macosx/VideoView.m
@@ -133,12 +133,8 @@
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");
diff --git a/modules/gui/macosx/intf.m b/modules/gui/macosx/intf.m
index fead1e4..aba3666 100644
--- a/modules/gui/macosx/intf.m
+++ b/modules/gui/macosx/intf.m
@@ -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;
diff --git a/src/libvlc-module.c b/src/libvlc-module.c
index 34a229e..912eab1 100644
--- a/src/libvlc-module.c
+++ b/src/libvlc-module.c
@@ -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+="
More information about the vlc-commits
mailing list