Appendix G. Shortcuts customization
Prev |  | Next

## Appendix G. Shortcuts customization

## 1. Shortcuts customization

Most of the items that appear in the main menu can have a new shortcut assigned. Only the most commonly used menu items are assigned a shortcut by default. You can change the already assigned shortcuts and add new shortcuts by putting a shortcut definition file in your OmegaT preferences folder (see User files location).

The shortcut definition file must be named `MainMenuShortcuts.properties` and must contain at most one shortcut definition per line. Empty lines are accepted and comment lines should start with "//". Anything after the "//" will be ignored.

Once the `MainMenuShortcuts.properties` file is modified, OmegaT must be relaunched to take the new shortcuts into account.

The shortcut definition syntax is the following: `<menu item code>=<shortcut>`, where <menu item code> is a code taken from the tables below and <shortcut> is a combination of pressed keys specified by the user[2].

<shortcut> must be of the following form:0 or more `<modifier>` followed by 0 or 1 `<event>` followed by 1 `<key>`, where:

- `<modifier>` can be: shift, control, ctrl, meta[3], alt, altGraph

- `<event>` can be: typed, pressed, released

- and `<key>` can be any key available on your keyboard[4].

For example, in the default OmegaT shortcuts[5], one can find:

- `projectOpenMenuItem=ctrl O`

- `editCreateGlossaryEntryMenuItem=ctrl shift G`

The first is the shortcut for Open Project, the second for Create Glossary Entry.

If you want to use Shift+Ctrl+O to open a project, modify your `MainMenuShortcuts.properties` as follows:``

`projectOpenMenuItem=shift ctrl O`.

If you are on a Mac and you want to add a Shift+Command+S shortcut to Tools → Statistics, add the following line to your `MainMenuShortcuts.properties`:``

`toolsShowStatisticsStandardMenuItem=shift meta S`

Save then the file and relaunch OmegaT. Your new shortcuts should now appear next to the menu items you have modified. If they do not conflict with system shortcuts, they should be available from within OmegaT.

## 2. Project Menu

Table G.1. Project Menu

Menu Item | Default shortcut | Menu Item Code
--- | --- | ---
New |  | projectNewMenuItem
Open | Ctrl+O | projectOpenMenuItem
Import Source Files... |  | projectImportMenuItem
Import From MediaWiki... |  | projectWikiImportMenuItem
Reload | F5 | projectReloadMenuItem
Close | Ctrl+Shift+W | projectCloseMenuItem
Save | Ctrl+S | projectSaveMenuItem
Create translated documents | Ctrl+D | projectCompileMenuItem
Properties... | Ctrl+E | projectEditMenuItem
Project Files... | Ctrl+L | viewFileListMenuItem
Quit | Ctrl+Q | projectExitMenuItem

## 3. Edit Menu

Table G.2. Edit Menu

Menu Item | Default shortcut | Menu Item Code
--- | --- | ---
Undo Last Action | Ctrl+Z | editUndoMenuItem
Redo Last Action | Ctrl+Y | editRedoMenuItem
Replace With Match | Ctrl+R | editOverwriteTranslationMenuItem
Insert Match | Ctrl+I | editInsertTranslationMenuItem
Replace with Machine Translation | Ctrl+M | editOverwriteMachineTranslationMenuItem
Replace With Source | Shift+Ctrl+R | editOverwriteSourceMenuItem
Insert Source | Shift+Ctrl+I | editInsertSourceMenuItem
Insert Source Tags | Shift+Ctrl+T | editTagPainterMenuItem
Export Selection | Shift+Ctrl+C | editExportSelectionMenuItem
Create Glossary Entry | Shift+Ctrl+G | editCreateGlossaryEntryMenuItem
Search Project... | Ctrl+F | editFindInProjectMenuItem
Select Fuzzy Match 1 | Ctrl+1 | editSelectFuzzy1MenuItem
Select Fuzzy Match 2 | Ctrl+2 | editSelectFuzzy2MenuItem
Select Fuzzy Match 3 | Ctrl+3 | editSelectFuzzy3MenuItem
Select Fuzzy Match 4 | Ctrl+4 | editSelectFuzzy4MenuItem
Select Fuzzy Match 5 | Ctrl+5 | editSelectFuzzy5MenuItem
Lower Case |  | lowerCaseMenuItem
Upper Case |  | upperCaseMenuItem
Title Case |  | titleCaseMenuItem
Switch case to... | Shift+F3 | cycleSwitchCaseMenuItem

## 4. GoTo Menu

Table G.3. GoTo Menu

Menu Item | Default shortcut | Menu Item Code
--- | --- | ---
Next Untranslated Segment | Ctrl+U | gotoNextUntranslatedMenuItem
Next Segment | Ctrl+N or Enter or Tab | gotoNextSegmentMenuItem
Previous Segment | Ctrl+P or Ctrl+Enter or Ctrl+Tab | gotoPreviousSegmentMenuItem
Segment number... | Ctrl+J | gotoSegmentMenuItem
Back in history... | Ctrl+Shift+P | gotoHistoryForwardMenuItem
Forward in history... | Ctrl+Shift+N | gotoHistoryBackMenuItem

## 5. View Menu

Table G.4. View Menu

Menu Item | Default shortcut | Menu Item Code
--- | --- | ---
Mark Translated Segments |  | viewMarkTranslatedSegmentsCheckBoxMenuItem
Mark Untranslated Segments |  | viewMarkUntranslatedSegmentsCheckBoxMenuItem
Display Source Segments |  | viewDisplaySegmentSourceCheckBoxMenuItem
Mark Non-Unique Segments |  | viewMarkNonUniqueSegmentsCheckBoxMenuItem
Modification Info/Display None |  | viewDisplayModificationInfoNoneRadioButtonMenuItem
Modification Info/Display Selected |  | viewDisplayModificationInfoSelectedRadioButtonMenuItem
Modification Info/Display All |  | viewDisplayModificationInfoAllRadioButtonMenuItem

## 6. Tools Menu

Table G.5. Tools Menu

Menu Item | Default shortcut | Menu Item Code
--- | --- | ---
Validate Tags | Ctrl +T | toolsValidateTagsMenuItem
Statistics |  | toolsShowStatisticsStandardMenuItem
Match Statistics |  | toolsShowStatisticsMatchesMenuItem

## 7. Options Menu

Table G.6. Options Menu

Menu Item | Default shortcut | Menu Item Code
--- | --- | ---
Use TAB To Advance |  | optionsTabAdvanceCheckBoxMenuItem
Always Confirm Quit |  | optionsAlwaysConfirmQuitCheckBoxMenuItem
Machine Translate |  |
TransTips/Enable Transtips |  | optionsTransTipsEnableMenuItem
TransTips/Exact Match |  | optionsTransTipsExactMatchMenuItem
Font... |  | optionsFontSelectionMenuItem
File Filters... |  | optionsSetupFileFiltersMenuItem
Segmentation... |  | optionsSentsegMenuItem
Spell checking... |  | optionsSpellCheckMenuItem
Editing Behavior... |  | optionsWorkflowMenuItem
Tag Validation... |  | optionsTagValidationMenuItem
Team... |  | optionsTeamMenuItem
External TMXs... |  | optionsExtTMXMenuItem
View... |  | optionsViewOptionsMenuItem
Save... |  | optionsSaveOptionsMenuItem
Proxy login... |  | optionsViewOptionsMenuLoginItem
Restore Main Window |  | optionsRestoreGUIMenuItem

## 8. Help Menu

Table G.7. Help Menu

Menu Item | Default shortcut | Menu Item Code
--- | --- | ---
User Manual... | F1 | helpContentsMenuItem
About... |  | helpAboutMenuItem

[2] The full syntax for keystrokes (shortcuts) is defined in the following Java 1.6 documentation from Oracle (bottom of page): Java 1.6 keystrokes shortcuts

[3] On the Mac, the modifier meta must be used to specify the command key.

[4] The possible keyevents (keys) are listed in the following Java 1.6 documentation from Oracle: Java 1.6 keyEvents description

[5] The default OmegaT shortcuts are available from Sourceforge: Default OmegaT Shortcuts

The default OmegaT shortcuts for the Mac are also available from Sourceforge, they all use "meta" instead of "ctrl": Default OmegaT Shortcuts for the Mac

Prev |  | Next
Appendix F. Keyboard shortcuts in the editor | Home | Appendix H. Legal notices