]> git.sesse.net Git - vlc/commitdiff
macosx: fix page up / page down hotkey support
authorDavid Fuhrmann <david.fuhrmann@googlemail.com>
Thu, 27 Feb 2014 16:25:18 +0000 (17:25 +0100)
committerDavid Fuhrmann <david.fuhrmann@googlemail.com>
Thu, 27 Feb 2014 16:46:33 +0000 (17:46 +0100)
close #10716

modules/gui/macosx/StringUtility.m
modules/gui/macosx/simple_prefs.m

index 614040c3e24d9d0a9d145f94e653f4387342c0c8..1498875cd8c0b753f70f1948f799ed2ef119b0de 100644 (file)
@@ -139,6 +139,8 @@ static VLCStringUtility *_o_sharedInstance = nil;
         /* show non-character keys correctly */
         theString = [theString stringByReplacingOccurrencesOfString:@"Right" withString:[NSString stringWithUTF8String:"\xE2\x86\x92"]];
         theString = [theString stringByReplacingOccurrencesOfString:@"Left" withString:[NSString stringWithUTF8String:"\xE2\x86\x90"]];
+        theString = [theString stringByReplacingOccurrencesOfString:@"Page Up" withString:[NSString stringWithUTF8String:"\xE2\x87\x9E"]];
+        theString = [theString stringByReplacingOccurrencesOfString:@"Page Down" withString:[NSString stringWithUTF8String:"\xE2\x87\x9F"]];
         theString = [theString stringByReplacingOccurrencesOfString:@"Up" withString:[NSString stringWithUTF8String:"\xE2\x86\x91"]];
         theString = [theString stringByReplacingOccurrencesOfString:@"Down" withString:[NSString stringWithUTF8String:"\xE2\x86\x93"]];
         theString = [theString stringByReplacingOccurrencesOfString:@"Enter" withString:[NSString stringWithUTF8String:"\xe2\x86\xb5"]];
@@ -261,7 +263,11 @@ unsigned int CocoaKeyToVLC(unichar i_key)
 #pragma GCC diagnostic ignored "-Wformat"
 #endif
     if ([theString length] > 1) {
-        if ([theString rangeOfString:@"Up"].location != NSNotFound)
+        if ([theString rangeOfString:@"Page Up"].location != NSNotFound)
+            return [NSString stringWithFormat:@"%C", NSPageUpFunctionKey];
+        else if ([theString rangeOfString:@"Page Down"].location != NSNotFound)
+            return [NSString stringWithFormat:@"%C", NSPageDownFunctionKey];
+        else if ([theString rangeOfString:@"Up"].location != NSNotFound)
             return [NSString stringWithFormat:@"%C", NSUpArrowFunctionKey];
         else if ([theString rangeOfString:@"Down"].location != NSNotFound)
             return [NSString stringWithFormat:@"%C", NSDownArrowFunctionKey];
@@ -277,10 +283,6 @@ unsigned int CocoaKeyToVLC(unichar i_key)
             return [NSString stringWithFormat:@"%C", NSHomeFunctionKey];
         else if ([theString rangeOfString:@"End"].location != NSNotFound)
             return [NSString stringWithFormat:@"%C", NSEndFunctionKey];
-        else if ([theString rangeOfString:@"Pageup"].location != NSNotFound)
-            return [NSString stringWithFormat:@"%C", NSPageUpFunctionKey];
-        else if ([theString rangeOfString:@"Pagedown"].location != NSNotFound)
-            return [NSString stringWithFormat:@"%C", NSPageDownFunctionKey];
         else if ([theString rangeOfString:@"Menu"].location != NSNotFound)
             return [NSString stringWithFormat:@"%C", NSMenuFunctionKey];
         else if ([theString rangeOfString:@"Tab"].location != NSNotFound)
index 082562ca6eb7606f067200f6bbf1478bb74b223a..bf9ab4c617afd02b70a124e8bb3e022cf8f26da2 100644 (file)
@@ -1585,9 +1585,9 @@ static inline void save_string_list(intf_thread_t * p_intf, id object, const cha
     else if (key == NSEndFunctionKey)
         [tempString appendString:@"End"];
     else if (key == NSPageUpFunctionKey)
-        [tempString appendString:@"Pageup"];
+        [tempString appendString:@"Page Up"];
     else if (key == NSPageDownFunctionKey)
-        [tempString appendString:@"Pagedown"];
+        [tempString appendString:@"Page Down"];
     else if (key == NSMenuFunctionKey)
         [tempString appendString:@"Menu"];
     else if (key == NSTabCharacter)