Show More
@@ -8,34 +8,42 b'' | |||||
8 | var IPython = (function (IPython) { |
|
8 | var IPython = (function (IPython) { | |
9 | "use strict"; |
|
9 | "use strict"; | |
10 |
|
10 | |||
|
11 | var platform = IPython.utils.platform; | |||
|
12 | ||||
11 | var QuickHelp = function (selector) { |
|
13 | var QuickHelp = function (selector) { | |
12 | }; |
|
14 | }; | |
|
15 | var cmd_ctrl = 'Ctrl'; | |||
|
16 | ||||
|
17 | if (platform === 'MacOS') { | |||
|
18 | cmd_ctrl = 'Cmd'; | |||
|
19 | } | |||
13 |
|
20 | |||
14 | var cm_shortcuts = [ |
|
21 | var cm_shortcuts = [ | |
15 | { shortcut:"Insert", help:"toggle overwrite" }, |
|
22 | { shortcut:"Insert", help:"toggle overwrite" }, | |
16 | { shortcut:"Tab", help:"code completion" }, |
|
23 | { shortcut:"Tab", help:"code completion" }, | |
17 | { shortcut:"Shift-Tab", help:"help introspection" }, |
|
24 | { shortcut:"Shift-Tab", help:"help introspection" }, | |
18 |
{ shortcut: |
|
25 | { shortcut: cmd_ctrl + "-]", help:"indent" }, | |
19 |
{ shortcut: |
|
26 | { shortcut: cmd_ctrl + "-[", help:"dedent" }, | |
20 |
{ shortcut: |
|
27 | { shortcut: cmd_ctrl + "-A", help:"select all" }, | |
21 |
{ shortcut: |
|
28 | { shortcut: cmd_ctrl + "-D", help:"delete line" }, | |
22 |
{ shortcut: |
|
29 | { shortcut: cmd_ctrl + "-Z", help:"undo" }, | |
23 |
{ shortcut: |
|
30 | { shortcut: cmd_ctrl + "-Shift-Z", help:"redo" }, | |
24 |
{ shortcut: |
|
31 | { shortcut: cmd_ctrl + "-Y", help:"redo" }, | |
25 |
{ shortcut: |
|
32 | { shortcut: cmd_ctrl + "-Up", help:"go to cell start" }, | |
26 |
{ shortcut: |
|
33 | { shortcut: cmd_ctrl + "-End", help:"go to cell start" }, | |
27 | { shortcut:"PageUp", help:"go to cell start" }, |
|
34 | { shortcut:"PageUp", help:"go to cell start" }, | |
28 | { shortcut:"---", help:"go to cell end" }, |
|
35 | { shortcut:"---", help:"go to cell end" }, | |
29 |
{ shortcut: |
|
36 | { shortcut: cmd_ctrl + "-Down", help:"go to cell end" }, | |
30 | { shortcut:"PageDown", help:"go to cell end" }, |
|
37 | { shortcut:"PageDown", help:"go to cell end" }, | |
31 | { shortcut:"Alt-Left", help:"go one word left" }, |
|
38 | { shortcut:"Alt-Left", help:"go one word left" }, | |
32 | { shortcut:"Alt-Right", help:"go one word right" }, |
|
39 | { shortcut:"Alt-Right", help:"go one word right" }, | |
33 |
{ shortcut: |
|
40 | { shortcut: cmd_ctrl + "-Left", help:"go to line start" }, | |
34 | { shortcut:"Home", help:"go to line start" }, |
|
41 | { shortcut:"Home", help:"go to line start" }, | |
35 |
{ shortcut: |
|
42 | { shortcut: cmd_ctrl + "-Right", help:"go to line end" }, | |
36 | { shortcut:"End", help:"go to line end" }, |
|
43 | { shortcut:"End", help:"go to line end" }, | |
37 | { shortcut:"Alt-Backspace", help:"del word before" }, |
|
44 | { shortcut:"Alt-Backspace", help:"del word before" }, | |
38 |
|
45 | |||
|
46 | ||||
39 | ] |
|
47 | ] | |
40 |
|
48 | |||
41 |
|
49 |
General Comments 0
You need to be logged in to leave comments.
Login now