forked from openscad/openscad
-
Notifications
You must be signed in to change notification settings - Fork 1
Keyboard Shortcuts
kintel edited this page Sep 3, 2014
·
7 revisions
- (* means it'is available, depending if it has an Operating System reserved function)
- (# means it's not shown on menu but in source code)
- C - Ctrl (Cmd on Mac)
- S - Shift
- A - Alt
- M - Ctrl on Mac (Windows/Meta key on others)
Key | Modifier | Menu Entry | Notes |
---|---|---|---|
F1* | |||
F2 | F_ile/S_ave# | ||
F3 | F_ile/R_eload# | ||
F4 | D_esign/R_eload and Preview | ||
F5 | D_esign/P_review | ||
F6 | D_esign/R_ender | ||
F7* | |||
F8* | |||
F9 | V_iew/Preview | ||
F10 | V_iew/Surfaces | ||
F11 | V_iew/Wireframe | ||
F12 | V_iew/Thrown Together | ||
+ | C | E_dit/Zoom In | |
- | C | E_dit/Zoom Out | |
1 | C | V_iew/Show Edges | |
2 | C | V_iew/Show Axis | |
3 | C | V_iew/Show Crosshairs | |
4 | C | V_iew/Top | |
5 | C | V_iew/Bottom | |
6 | C | V_iew/Left | |
7 | C | V_iew/Right | |
8 | C | V_iew/Front | |
9 | C | V_iew/Back | |
0 | C | V_iew/Diagonal | |
A | C | does Select A_ll | should add to menu |
B* | |||
C | C | E_dit/C_opy | |
D | C | E_dit/Co_mment | Overridden by Scintilla |
D | CS | E_dit/Uncom_ment | |
F | C | E_dit/Find... | |
F | CA | E_dit/Find and Replace... | is different pattern to other keys, maybe should be CS-F? |
G | C | E_dit/Find Next | |
G | CS | E_dit/Find Previous | |
H* | |||
I | C | E_dit/I_ndent | |
I | CS | E_dit/Un_indent | |
J* | |||
K* | |||
L* | |||
M* | |||
N | C | F_ile/N_ew | |
O | C | F_ile/O_pen... | |
P | C | Used to be View/Center, reserved for Print | |
Q | C | F_ile/Q_uit | |
R | C | F_ile/R_eload | |
S | C | F_ile/S_ave | |
S | CS | F_ile/Save A_s | |
T | C | Paste Viewport Translation | Overridden by Scintilla |
U* | |||
V | C | E_dit/P_aste | |
W | C | F_ile/Close | |
X | C | E_dit/Cut_ | |
Y* | |||
Z | C | E_dit/U_ndo | |
Z | CS | E_dit/R_edo | Overridden by Scintilla on some platforms |
] | C | View/Zoom In | |
[ | C | View/Zoom Out |
Note: Navigation shortcuts + Shift will typically in addition extend the current selection to include the navigated text. NB! This doesn't work if there is a bound printable character on the upper-case key - on Mac, typically Cmd-Shift-/ == Cmd-? = Help Menu.
Note: Shift-Alt manages rectangular selections
Key | Modifier | Function | Notes |
---|---|---|---|
Left | Char left | FIXME: Arrow keys need more details | |
Right | Char right | ||
Up | Line up | Visual line up | |
Down | Line down | Visual line down | |
Home | VCHome | FIXME: First non-whitespace start of line? | |
End | Line End | ||
Home | C | Doc start | |
End | C | Doc end | |
[ | C | Paragraph Up | |
] | C | Paragraph Down | |
/ | C | Word left | |
\ | C | Word right |
Mac-only navigation shortcuts:
Key | Modifier | Function | Notes |
---|---|---|---|
A | M | Navigate Start of line | Mac |
B | M | Navigate Char left | Mac |
E | M | Navigate End of line | Mac |
F | M | Navigate Char right | Mac |
L | M | Scroll to center view on current line | Mac |
N | M | Navigate Line Down | Mac |
P | M | Navigate Line Up | Mac |
V | M | Navigate Page down | Mac |
D | M | Delete next char | Mac |
H | M | Delete previous char | Mac |
K | M | Delete to end of line | Mac |
Backspace | Fn | Delete key | Mac |
Left | Fn | Home key | Mac |
Right | Fn | End key | Mac |
Up | Fn | Page Up key | Mac |
Down | Fn | Page Down key | Mac |
Key | Modifier | Function | Notes |
---|---|---|---|
Delete | Delete next char | ||
Delete | C | Delete next word | |
Delete | CS | Delete to end of line | |
Backspace | Delete previous char | ||
Backspace | C | Delete previous word | |
Backspace | CS | Delete to start of line | |
Backspace | M | Undo | FIXME: Should not be undo on Mac, but delete previous word |
Insert | Toggle overwrite | ||
Insert | S | Paste | |
Insert | C | Copy | |
Tab | Tab | If the current selection is multi-line, tab each line | |
Tab | Shift | Backtab | If the current selection is multi-line, backtab each line |
Return | |||
Escape | Cancel | FIXME: Cancel what? (typically closes dialogues) | |
+ | C | Zoom In | |
- | C | Zoom Out | |
1 | |||
2 | |||
3 | |||
4 | |||
5 | |||
6 | |||
7 | |||
8 | |||
9 | |||
0 | |||
A | C | Select All | |
C | C | Copy selection | |
D | C | Duplicate Selection | |
G | |||
I | |||
J | |||
L | C | Cut Line | |
L | CS | Delete Line | |
M | |||
O | |||
Q | |||
R | |||
S | |||
T | C | ||
T | CS | Copy Line | |
U | C | Lowercase selection | |
U | CS | Uppercase selection | |
V | C | Paste | |
W | |||
X | C | Cut selection | |
Y | C | Redo | !Mac |
Z | C | Undo | |
Z | CS | Redo |
FIXME: {SCK_BACK, SCI_NORM, SCI_DELETEBACK}, {SCK_BACK, SCI_SHIFT, SCI_DELETEBACK}, {SCK_BACK, SCI_CTRL, SCI_DELWORDLEFT}, {SCK_BACK, SCI_ALT, SCI_UNDO}, {SCK_BACK, SCI_CSHIFT, SCI_DELLINELEFT},
- Console
- Other windows
- Text fields (animation, Search&Replace)
- Standard OS shortcuts (Qt): http://qt-project.org/doc/qt-5/qkeysequence.html
- Standard OS X shortcuts: http://support.apple.com/kb/HT1343?viewlocale=en_US&locale=en_US
QScintilla hijacks all keyboard bindings, so any key bound both by QScintilla and the global menus will be shadowed by scintilla.
Event configuration:
- Default keymap is created: MapDefault in KeyMap.cpp:81
- Ctrl-[a-z] (Mac: Cmd-[a-z]) is disabled (qscicommandset.cpp:869)
- Add key bindings from cmd_table in qscicommandset.cpp:55
Event handling:
- QScintilla events are first handled in QsciScintilla::event(QEvent *e) (qscintilla.cpp:4129) -> this code overrides any global menu shortcuts if they're bound by qscintilla
- QScintilla events are handled in QsciScintillaBase::keyPressEvent(QKeyEvent *e) (qscintillabase.cpp:376) -> this triggers the actual qscintilla operation
- If event is not consumed, it bubbles up the event handler (widget) hierarchy