Skip to content
Torsten Paul edited this page Nov 25, 2020 · 33 revisions

Overview over OpenSCAD keyboard shortcuts and Mnemonics

  • (* 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)
  • _ - in menus follows the menu-shortcut character, e.h. V_iew/T_op is Alt+v then t

Menu Shortcuts

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/Re_nder
F7 F_ile/Ex_port/Export as S_TL
F8 D_esign/3_D Print
F9 V_iew/Preview
F10 V_iew/Surfaces
F11 V_iew/Wireframe
F12 V_iew/Thrown Together
+ C E_dit/Zoom In ie font size
- 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/T_op
5 C V_iew/B_ottom
6 C V_iew/L_eft
7 C V_iew/R_ight
8 C V_iew/F_ront
9 C V_iew/Back_
0 C V_iew/D_iagonal
0 CS V_iew/Ce_nter
A C does Select A_ll should add to context menu
B*
C C E_dit/C_opy
C CS E_dit/Copy viewport imag_e
D C E_dit/Co_mment Overridden by Scintilla
D CS E_dit/Uncom_ment
E C E_dit/Use Sel_ection for Find
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 in 2013.06, 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 E_dit/Copy Viewport Transla_tion Overridden by Scintilla
U*
V C E_dit/P_aste
V CS V_iew/View All
W C F_ile/C_lose
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 V_iew/Zoom In
[ C V_iew/Zoom Out

Editor Shortcuts

Navigation Shortcuts

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

Function Shortcuts

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 new: Also on 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},

Other Shortcuts

  • Console
  • Other windows
  • Text fields (animation, Search&Replace)

Notes

QScintilla Notes

QScintilla hijacks all keyboard bindings, so any key bound both by QScintilla and the global menus will be shadowed by scintilla.

Event configuration:

  1. Default keymap is created: MapDefault in KeyMap.cpp:81
  2. Ctrl-[a-z] (Mac: Cmd-[a-z]) is disabled (qscicommandset.cpp:869)
  3. 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
Clone this wiki locally