##// END OF EJS Templates
completed both sets of platform-specific shortcuts
Paul Ivanov -
Show More
@@ -15,36 +15,61 var IPython = (function (IPython) {
15 var cmd_ctrl = 'Ctrl';
15 var cmd_ctrl = 'Ctrl';
16
16
17 if (platform === 'MacOS') {
17 if (platform === 'MacOS') {
18 // Mac OS X specific
18 cmd_ctrl = 'Cmd';
19 cmd_ctrl = 'Cmd';
20 var platform_specific = [
21 { shortcut: "Cmd-Up", help:"go to cell start" },
22 { shortcut: "Cmd-End", help:"go to cell start" },
23 { shortcut: "PageUp", help:"go to cell start" },
24 { shortcut: "Cmd-Down", help:"go to cell end" },
25 { shortcut: "PageDown", help:"go to cell end" },
26 { shortcut: "Alt-Left", help:"go one word left" },
27 { shortcut: "Alt-Right", help:"go one word right" },
28 { shortcut: "Cmd-Left", help:"go to line start" },
29 { shortcut: "Home", help:"go to line start" },
30 { shortcut: "Cmd-Right", help:"go to line end" },
31 { shortcut:"End", help:"go to line end" },
32 { shortcut:"Alt-Backspace", help:"del word before" },
33 { shortcut:"Ctrl-Alt-Backspace", help:"del word after" },
34 { shortcut:"Alt-Delete", help:"del word after" },
35 ]
36 } else {
37 // PC specific
38 var platform_specific = [
39 { shortcut: "Ctrl-Home", help:"go to cell start" },
40 { shortcut: "Alt-Up", help:"go to cell start" },
41 { shortcut: "PageUp", help:"go to cell start" },
42 { shortcut: "Ctrl-End", help:"go to cell end" },
43 { shortcut: "Ctrl-Down", help:"go to cell end" },
44 { shortcut: "PageDown", help:"go to cell end" },
45 { shortcut: "Ctrl-Left", help:"go one word left" },
46 { shortcut: "Ctrl-Right", help:"go one word right" },
47 { shortcut: "Alt-Right", help:"go to cell end" },
48 { shortcut: "Alt-Left", help:"go to line start" },
49 { shortcut: "Home", help:"go to line start" },
50 { shortcut: "Alt-Right", help:"go to line end" },
51 { shortcut: "End", help:"go to line end" },
52 { shortcut: "Ctrl-Backspace", help:"del word before" },
53 { shortcut: "Ctrl-Delete", help:"del word after" },
54 ]
19 }
55 }
20
56
21 var cm_shortcuts = [
57 var cm_shortcuts = [
22 { shortcut:"Insert", help:"toggle overwrite" },
58 { shortcut:"Insert", help:"toggle overwrite" },
23 { shortcut:"Tab", help:"code completion" },
59 { shortcut:"Tab", help:"code completion" },
24 { shortcut:"Shift-Tab", help:"help introspection" },
60 { shortcut:"Shift-Tab", help:"help introspection" },
25 { shortcut: cmd_ctrl + "-]", help:"indent" },
61 { shortcut: cmd_ctrl + "-]", help:"indent" },
26 { shortcut: cmd_ctrl + "-[", help:"dedent" },
62 { shortcut: cmd_ctrl + "-[", help:"dedent" },
27 { shortcut: cmd_ctrl + "-A", help:"select all" },
63 { shortcut: cmd_ctrl + "-A", help:"select all" },
28 { shortcut: cmd_ctrl + "-D", help:"delete line" },
64 { shortcut: cmd_ctrl + "-D", help:"delete line" },
29 { shortcut: cmd_ctrl + "-Z", help:"undo" },
65 { shortcut: cmd_ctrl + "-Z", help:"undo" },
30 { shortcut: cmd_ctrl + "-Shift-Z", help:"redo" },
66 { shortcut: cmd_ctrl + "-Shift-Z", help:"redo" },
31 { shortcut: cmd_ctrl + "-Y", help:"redo" },
67 { shortcut: cmd_ctrl + "-Y", help:"redo" },
32 { shortcut: cmd_ctrl + "-Up", help:"go to cell start" },
68 ].concat( platform_specific );
33 { shortcut: cmd_ctrl + "-End", help:"go to cell start" },
69
34 { shortcut:"PageUp", help:"go to cell start" },
70
35 { shortcut:"---", help:"go to cell end" },
71
36 { shortcut: cmd_ctrl + "-Down", help:"go to cell end" },
72
37 { shortcut:"PageDown", help:"go to cell end" },
38 { shortcut:"Alt-Left", help:"go one word left" },
39 { shortcut:"Alt-Right", help:"go one word right" },
40 { shortcut: cmd_ctrl + "-Left", help:"go to line start" },
41 { shortcut:"Home", help:"go to line start" },
42 { shortcut: cmd_ctrl + "-Right", help:"go to line end" },
43 { shortcut:"End", help:"go to line end" },
44 { shortcut:"Alt-Backspace", help:"del word before" },
45
46
47 ]
48
73
49
74
50 QuickHelp.prototype.show_keyboard_shortcuts = function () {
75 QuickHelp.prototype.show_keyboard_shortcuts = function () {
General Comments 0
You need to be logged in to leave comments. Login now