Keyboard Shortcuts
From Xojo Documentation
General
Hold down Alt (Windows), Shift (on Linux) or Option (on Mac) to prevent loading the user interface state for the IDE. This prevents the loading of tabs and defaults Xojo to a standard window size.
- ⌥ = Option key
- ⌘ = Command key
- ^ or Ctrl = Control key
- ⇧ or Shift = Shift key
- Alt = Alternate key
Code Editor
These are the keyboard shortcuts that work with the Code Editor. Add Shift to many of the these commands to also select the text. In general, the Code Editor on Mac uses standard Cocoa text editor keyboard shortcuts, so there may be other shortcuts available that are not listed here.
Mac | Windows | Linux | Description |
---|---|---|---|
⌘ + [Double-click on method] | Ctrl + [Double-click on method] | Ctrl + [Double-click on method] | Navigate to the method that was double-clicked. |
⌘ + ' | Ctrl + ' | Ctrl + ' | Comment or uncomment the selected block of code. If not code is selected, then it works on the current line. |
⌥ + Enter
⌥ + Return |
Ctrl + m
Ctrl + Enter Ctrl + Return |
Ctrl + m
Ctrl + Enter Ctrl + Return |
Adds the Line Continuation character "_" and moves you to a new line. |
⌘ + \ | Ctrl + \ | Ctrl + \ | Toggles the breakpoint on/off for the current line of code. |
⇧ + Return | Shift + Return | Shift + Return | This will auto-complete a code block. For example, if you type "If True" and then press Shift-Return, the code editor will auto-complete to look like the following:
with the cursor on the line between the Then and the End If. This works with all code blocks, such as If...Then, While...Wend, For...Next, Select Case, etc. |
⌘ + Left Arrow | Home | Home | Moves the cursor to the beginning of the line. |
⌘ + Right Arrow | End | End | Moves the cursor to the end of the line. |
^ + t | Transposes the characters at the cursor. | ||
^ + k | Deletes characters from the cursor to the end of the line. | ||
⌥ + Backspace | Ctrl + Backspace | Ctrl + Backspace | Deletes the previous word. |
⌘ + Backspace | Deletes characters from the cursor to the beginning of the line. | ||
⌥ + Right Arrow | Ctrl + Right Arrow | Ctrl + Right Arrow | Moves forward one word at a time. |
⌥ + Left Arrow | Ctrl + Left Arrow | Ctrl + Left Arrow | Moves backward one word at a time. |
⌥ + Delete | Ctrl + Delete | Ctrl + Delete | Deletes the next word. |
⌘ + Up Arrow
Home |
Ctrl + Home | Ctrl + Home | Go to first line of code. |
⌘ + Down Arrow
End |
Ctrl + End | Ctrl + End | Go to last line of code. |
Adding Your Own Menu Shortcuts
To add or change menu shortcuts, use the Menu shortcut editor in the General Preferences. In this editor there is an entry for each Xojo menu item. You can use this to change, add or remove a shortcut for any of the menu items.
On Mac you can also add your own shortcuts to menu items using System Preferences ↠ Keyboard ↠ Shortcuts and then select "App Shortcuts" in the list. Add Xojo manually and then specify the exact menu for which you want a shortcut. For example, to create a shortcut for clearing all breakpoints, you would create an entry like this and specify the keyboard shortcut you want (use "->" to specify nested menus):