iOS web browser with a focus on security and privacy
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

AppDelegate: use cmd+[ and cmd+] for back and forward shortcuts

cmd+left and cmd+right are used in text entry, so use the same
shortcuts as Safari

Fixes #69

+5 -5
+4 -4
Endless/AppDelegate.m
··· 197 197 if (!_keyCommands) { 198 198 _keyCommands = [[NSMutableArray alloc] init]; 199 199 200 - [_keyCommands addObject:[UIKeyCommand keyCommandWithInput:UIKeyInputLeftArrow modifierFlags:UIKeyModifierCommand action:@selector(handleKeyboardShortcut:) discoverabilityTitle:NSLocalizedString(@"Go Back", nil)]]; 201 - [_keyCommands addObject:[UIKeyCommand keyCommandWithInput:UIKeyInputRightArrow modifierFlags:UIKeyModifierCommand action:@selector(handleKeyboardShortcut:) discoverabilityTitle:NSLocalizedString(@"Go Forward", nil)]]; 200 + [_keyCommands addObject:[UIKeyCommand keyCommandWithInput:@"[" modifierFlags:UIKeyModifierCommand action:@selector(handleKeyboardShortcut:) discoverabilityTitle:NSLocalizedString(@"Go Back", nil)]]; 201 + [_keyCommands addObject:[UIKeyCommand keyCommandWithInput:@"]" modifierFlags:UIKeyModifierCommand action:@selector(handleKeyboardShortcut:) discoverabilityTitle:NSLocalizedString(@"Go Forward", nil)]]; 202 202 203 203 [_keyCommands addObject:[UIKeyCommand keyCommandWithInput:@"b" modifierFlags:UIKeyModifierCommand action:@selector(handleKeyboardShortcut:) discoverabilityTitle:NSLocalizedString(@"Show Bookmarks", nil)]]; 204 204 ··· 285 285 return; 286 286 } 287 287 288 - if ([[keyCommand input] isEqualToString:UIKeyInputLeftArrow]) { 288 + if ([[keyCommand input] isEqualToString:@"["]) { 289 289 [[[self webViewController] curWebViewTab] goBack]; 290 290 return; 291 291 } 292 292 293 - if ([[keyCommand input] isEqualToString:UIKeyInputRightArrow]) { 293 + if ([[keyCommand input] isEqualToString:@"]"]) { 294 294 [[[self webViewController] curWebViewTab] goForward]; 295 295 return; 296 296 }
+1 -1
Endless/Resources/injected.js
··· 141 141 return; 142 142 143 143 var e = document.createEvent("KeyboardEvent"); 144 - e.initKeyboardEvent(kind, false, true, document.body, "", 0, !!ctrl, !!alt, !!shift, !!meta, false); 144 + e.initKeyboardEvent(kind, false, true, window, "", 0, !!ctrl, !!alt, !!shift, !!meta, false); 145 145 Object.defineProperty(e, "keyCode", { writable: false, value: (kind == "keypress" ? keypress_keycode : keycode) } ); 146 146 Object.defineProperty(e, "which", { writable: false, value: (kind == "keypress" ? keypress_keycode : keycode) } ); 147 147 Object.defineProperty(e, "charCode", { writable: false, value: (kind == "keypress" ? keypress_keycode : 0) } );