Global hotkey/shortcut for activating a running Joplin instance?

If you use Microsoft Windows, you could do this with the program AutoHotkey (an automation app). Determine your desired keyboard shortcut (also called hotkey) to execute the command of bringing Joplin at focus or rather to the foreground, if it exists in the system tray or is minimized. In the following code, the used keyboard shortcut is Ctrl + Alt + k (in the code Ctrl is represented by ^; Alt is represented by !; k is represented by k, i.e. ^!k), you can change that if you like. The following code in an AutoHotkey file (with the extension .ahk) would do what you request (works in autohotkey version 2):

; This code automates opening Joplin from the system tray menu.
; This code is designed this way to be much faster than a built-in Windows shortcut. 

#Requires AutoHotkey v2.0
DetectHiddenWindows, On
CoordMode, Mouse, Screen

^!k:: {
	WinShow "ahk_exe Joplin.exe"
	If !WinActive("Joplin"){
		WinSetTransparent(1, winTitle := "ahk_class NotifyIconOverflowWindow")
		WinShow(winTitle)
		WinActivate(winTitle)
		MouseGetPos(&xpos, &ypos)
		ControlFocus("ToolbarWindow321", winTitle)
		Send("jj{Enter}")  ; This selects and starts Joplin because it begins with a "J". Sometimes I would need "{Left}" after "j".
		WinHide(winTitle)
		WinSetTransparent("Off", winTitle)
		Sleep(120)
		MouseMove(xpos, ypos, 0)
		}
	}

If you have another app icon, which name begins with "J" besides Joplin in the system tray menu you probably need to use Send("jj{Enter}") instead of Send("j{Enter}"). However, I think in the most cases Joplin is the only app beginning with the letter "J" in the system tray menu.
A short video how to install AutoHotkey and create a first AutoHotkey file (.ahk file) can be found on youtube. I cannot write hyperlinks here, just search, for example, "How to install — AutoHotkey v2".

1 Like