Customizing keyboard shortcuts using Autohotkey

Most Computer Aided Translation (CAT) tools support keyboard shortcuts to facilitate the translation process. It's required to use shortcuts to accelerate the translation process. For example, here are some of keyboard shortcuts for Trados 2007:

[Alt]+[Shift]+[Home] : Open - opens the current segment and searches for potential matches in the translation memory

[Alt]+[Home] : Open/Get

[Alt]+[Shift]+[Insert] : Get translation

[Alt]+[Ins] : Copy Source

[Alt]+[+] on numeric keypad : Set/Close Next Open/Get

[Alt]+[x] on numeric keypad : Translate to Fuzzy

[Alt]+[Up arrow] : Concordance - Searches the translation memory for selected text

For example, if you press [Alt]+[+], Translator's Workbench approves the current translation and move the next sentence. However, when you use other CAT tools, you might need to press a different keyboard combination. (For example, in across, you need to press [Alt]+[Down] (for moving to next paragraph) or [Ctrl]+[Alt]+[Right] (for moving to next paragraph  with state "in progress".) Actually, it's not easy to remember keyboard shortcuts for all CAT tools. In addition, it might be annoying to click an icon or a menu item every time.  Moreover, some might feel that it's a little annoying to press [+] key on the keyboard. For some reasons, you might want to change keyboard shortcuts.

In this case, AutoHotkey provides you with a good method to customize keyboard shortcuts.

AutoHotkey is a free, open-source utility for Windows, which enables you to do the followings:

  • Automates almost anything by sending keystrokes and mouse clicks. You can write a mouse or keyboard macro by hand or use the macro recorder.
  • Creates hotkeys for keyboard, joystick, and mouse. Virtually any key, button, or combination can become a hotkey.
  • Expands abbreviations as you type them. For example, typing "btw" can automatically produce "by the way".
  • Creates custom data-entry forms, user interfaces, and menu bars. See GUI for details.
  • Remaps keys and buttons on your keyboard, joystick, and mouse.
  • Responds to signals from hand-held remote controls via the WinLIRC client script.
  • Runs existing AutoIt v2 scripts and enhance them with new capabilities.
  • Converts any script into an EXE file that can be run on computers that don't have AutoHotkey installed.

AutoHotkey has many useful features. Among them, let's find out how to change shortcuts.

After installing AutoHotkey, you can create an AutoHotkey script (.ahk file) by right clicking on your desktop and then clicking "New > AutoHotkey Script."

Please rename the .ahk file as you wish and open it with a text editor such as Notepad (I usually uses EmEditor.) The ahk file will look like the following:

Before changing the keyboard shortcuts, I'll show you how it works.

Please add the following line at the bottom of the ahk file you just created.

::reslut::result
::abbout::about
::abotu::about

Using this simple pattern, you can create a list of frequently misspelled words. For example, when you incorrectly type "abbout," it will be automatically changed to "about." The pattern is very simple:

::<what you will type>::<the resulting word/phrase/sentence>

Using AutoHotkey, you can also create frequently used text snippets and email signatures. For example,

::look1::Thank you again and I look forward to hearing from you.

Typing "look1" will automatically produce "Thank you again and I look forward to hearing from you."  It can also be used to call a specific application such as Notepad.

#m::
Run, C:\Program Files\EmEditor\EmEditor.exe
return

In this case, EmEditor (if installed) will be opened if you press [Winkey]+[m.]

Here's the basic syntax for modifier keys when used together with another key (please refer to this webpage.)

KeySyntax
Alt!
Ctrl^
Shift+
Win Logo (Winkey)#

Now, let's find out how to customize Trados keyboard shortcuts. The keyboard combination for approving the current segmentation and then moving to next segmentation is [Alt]+[+.] I would like to change it to [Ctrl]+[Alt]+[n] ("next".) In this case, the following simple code will work.

^!n::Send, !{NumpadAdd}

That is the pattern "<desired keyboard combination>::Send, <actual keyboard combination>." With this pattern, you can customize any shortcuts as you wish.

AutoHotkey is a really handy application, which can be used in different ways. Please refer to the following webpages for more information on this application.


Leave a Comment

3s