Global hotkey/shortcut for activating a running Joplin instance?

Hi all, now that we got the great keyboard shortcuts editor in the desktop version, would it be possible to add a system-wide hotkey to activate (bring to front) Joplin when it is just visible in the systray?

1 Like

Yes, we talked about it already and it will be added. No ETA though.

3 Likes

Great, lookin forward to it.

Are there any news on that?
As far as I can see it still isn't possible to add a system-wide hotkey to activate (bring to front) Joplin when it is just visible in the systray, right?
Is there any ETA planned meanwhile?

Still nothing planned?

+1. I've started using Joplin on macOS and noticed this feature hadn't been implemented yet. (Or reverted?)

Currently, my primary note-taking app InkDrop has this feature added by this feature request:

://forum.inkdrop.app/t/hotkey-to-open-show-inkdrop/1262
(Please prepend https to the above link. I can't paste a link here because I'm a new user.)

So I'm wondering if Joplin could have the same hotkey the author implemented. Specifically:

  • If Joplin is activated > it works in the same way with Hide Joplin (⌘H)
  • If Joplin is inactivated > Joplin is activated

For example, the code for a macOS native app would look like this:

if NSRunningApplication.current.isActive {
  NSRunningApplication.current.hide()
} else {
  NSRunningApplication.current.activate(
    options: [.activateAllWindows, .activateIgnoringOtherApps])
}

Unfortunately, I'm neither familiar with Electron app development nor the codebase of Joplin. but I'm happy to try to implement it if the team is also happy. Well, as tessus mentioned, the shortcuts system might be under revamping, so it might not be a great time to start, though.

tessus, do you have any suggestions or advice?
(I'm a new user, so I can't mention you with @tessus...)

Any ETA for this?
This feature is really appreciated and having a system wide shortcut will significantly speed up bringing to the front Joplin. I bring it up frequently and this is actually taking about 2-3 seconds to load (via joplin.exe shortcut via file's properties)

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