Can I have a global hotkey to enter new tasks?

Created by Frank Niessink
Keywords:
Last updated by:
Jérôme Laheurte

On Windows, install AutoHotkey (see http://www.autohotkey.com/, it's open source and free) and put this in your AutoHotKey.ahk script:

^!n::
IfWinExist Task Coach
{
    WinActivate Task Coach
}
else
{
    Run %A_ProgramFiles%\TaskCoach\taskcoach.exe
}
WinWaitActive Task Coach
WinMenuSelectItem Task Coach,, Task, New task...
return

Starting with version 1.4, use the following:

^!n::
;global hotkey to enter new tasks in TaskCoach
IfWinExist Task Coach
{
WinActivate Task Coach
}
else
{
Run %A_ProgramFiles%\TaskCoach\taskcoach.exe
}
WinWaitActive Task Coach
WinMenuSelectItem Task Coach,, New, New task...
return

This will register Control-Alt-N as global hotkey for entering a new task. Task Coach will be started if necessary. If you use a translation, you need to change 'Task, New task...' into your language.

-----------------------------------------------------------------------------------------------------------------------

Kristijan Lenac provides this solution for Linux: make a bash script, containing these lines:

#!/bin/bash
wmctrl -a "Task Coach" && xvkbd -xsendevent -text "\[Insert]"

and assign it to a keyboard shortcut using xbindkeys. For example, put these two lines in the .xbindkeysrc file:

"/path/to/script/newtask.sh"
 Insert

Of course you need to install xbindkeys, xvkbd and wmctrl.

In this way it is also possible to remap existing keyboard shortcuts in Task Coach. This feature is currently lacking, but can be simply
achieved using another shortcut key in .xbindkeysrc.

Note that this solution only works if the Task Coach window is not minimized. A solution is to keep the window open in another workspace and use keystrokes to automatically switch to it (wmctrl -a "Task Coach" does that part).

-----------------------------------------------------------------------------------------------------------------------

We'd appreciate suggestions for other platforms...