[vlc-devel] commit: macosx: Fix configurability of some of the hotkeys ( Derk-Jan Hartman )

git version control git at videolan.org
Thu Jun 4 17:02:58 CEST 2009


vlc | branch: master | Derk-Jan Hartman <hartman at videolan.org> | Thu Jun  4 16:51:48 2009 +0200| [032f1e34ee664fa1be3a8eae56487ff2f6e6c698] | committer: Derk-Jan Hartman 

macosx: Fix configurability of some of the hotkeys

This partly fixes #2815, but the conflict of "Reveal in Finder" and "Record" has not yet been fixed.

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

 modules/gui/macosx/intf.m |   12 ++++++++++++
 src/libvlc-module.c       |   13 ++++---------
 2 files changed, 16 insertions(+), 9 deletions(-)

diff --git a/modules/gui/macosx/intf.m b/modules/gui/macosx/intf.m
index 466d25f..0c21694 100644
--- a/modules/gui/macosx/intf.m
+++ b/modules/gui/macosx/intf.m
@@ -463,6 +463,18 @@ static VLCMain *_o_sharedMainInstance = nil;
     i_key = config_GetInt( p_intf, "key-snapshot" );
     [o_mi_snapshot setKeyEquivalent: [NSString stringWithFormat:@"%C", VLCKeyToCocoa( i_key )]];
     [o_mi_snapshot setKeyEquivalentModifierMask: VLCModifiersToCocoa(i_key)];
+    i_key = config_GetInt( p_intf, "key-random" );
+    [o_mi_random setKeyEquivalent: [NSString stringWithFormat:@"%C", VLCKeyToCocoa( i_key )]];
+    [o_mi_random setKeyEquivalentModifierMask: VLCModifiersToCocoa(i_key)];
+    i_key = config_GetInt( p_intf, "key-zoom-half" );
+    [o_mi_half_window setKeyEquivalent: [NSString stringWithFormat:@"%C", VLCKeyToCocoa( i_key )]];
+    [o_mi_half_window setKeyEquivalentModifierMask: VLCModifiersToCocoa(i_key)];
+    i_key = config_GetInt( p_intf, "key-zoom-original" );
+    [o_mi_normal_window setKeyEquivalent: [NSString stringWithFormat:@"%C", VLCKeyToCocoa( i_key )]];
+    [o_mi_normal_window setKeyEquivalentModifierMask: VLCModifiersToCocoa(i_key)];
+    i_key = config_GetInt( p_intf, "key-zoom-double" );
+    [o_mi_double_window setKeyEquivalent: [NSString stringWithFormat:@"%C", VLCKeyToCocoa( i_key )]];
+    [o_mi_double_window setKeyEquivalentModifierMask: VLCModifiersToCocoa(i_key)];
 
     var_Create( p_intf, "intf-change", VLC_VAR_BOOL );
 
diff --git a/src/libvlc-module.c b/src/libvlc-module.c
index fc7aa0c..c2be480 100644
--- a/src/libvlc-module.c
+++ b/src/libvlc-module.c
@@ -2117,15 +2117,10 @@ vlc_module_begin ()
  *  open network                  KEY_MODIFIER_COMMAND|'n'
  *  open capture                  KEY_MODIFIER_COMMAND|'r'
  *  save playlist                 KEY_MODIFIER_COMMAND|'s'
- *  playlist random               KEY_MODIFIER_COMMAND|'z'
  *  playlist repeat all           KEY_MODIFIER_COMMAND|'l'
  *  playlist repeat               KEY_MODIFIER_COMMAND|'r'
- *  video half size               KEY_MODIFIER_COMMAND|'0'
- *  video normal size             KEY_MODIFIER_COMMAND|'1'
- *  video double size             KEY_MODIFIER_COMMAND|'2'
  *  video fit to screen           KEY_MODIFIER_COMMAND|'3'
  *  minimize window               KEY_MODIFIER_COMMAND|'m'
- *  quit application              KEY_MODIFIER_COMMAND|'q'
  *  close window                  KEY_MODIFIER_COMMAND|'w'
  *  streaming wizard              KEY_MODIFIER_COMMAND|KEY_MODIFIER_SHIFT|'w'
  *  show controller               KEY_MODIFIER_COMMAND|KEY_MODIFIER_SHIFT|'c'
@@ -2193,7 +2188,7 @@ vlc_module_begin ()
 #   define KEY_SNAPSHOT           KEY_MODIFIER_COMMAND|KEY_MODIFIER_ALT|'s'
 #   define KEY_ZOOM               'z'
 #   define KEY_UNZOOM             KEY_MODIFIER_SHIFT|'z'
-#   define KEY_RANDOM             'r'
+#   define KEY_RANDOM             KEY_MODIFIER_COMMAND|'z'
 #   define KEY_LOOP               KEY_MODIFIER_SHIFT|'l'
 
 #   define KEY_CROP_TOP           KEY_MODIFIER_ALT|'i'
@@ -2207,9 +2202,9 @@ vlc_module_begin ()
 
 /* the macosx-interface already has bindings */
 #   define KEY_ZOOM_QUARTER       KEY_UNSET
-#   define KEY_ZOOM_HALF          KEY_UNSET
-#   define KEY_ZOOM_ORIGINAL      KEY_UNSET
-#   define KEY_ZOOM_DOUBLE        KEY_UNSET
+#   define KEY_ZOOM_HALF          KEY_MODIFIER_COMMAND|'0'
+#   define KEY_ZOOM_ORIGINAL      KEY_MODIFIER_COMMAND|'1'
+#   define KEY_ZOOM_DOUBLE        KEY_MODIFIER_COMMAND|'2'
 
 #   define KEY_SET_BOOKMARK1      KEY_MODIFIER_COMMAND|KEY_F1
 #   define KEY_SET_BOOKMARK2      KEY_MODIFIER_COMMAND|KEY_F2




More information about the vlc-devel mailing list