Sublime Forum

[Question] Is it possible to use Sublime Text hotkey as global system hotkey?


1. Briefly

Is it possible use Sublime Text hotkeys as global system hotkeys cross-platform?

2. Settings

For example, part of my keymap:

{ "keys": ["super+alt+k"], "command": "sacagawea_chgk"},

3. Steps to reproduce

I open Sublime Text → I open any third-party program → my active window is third-party window, not Sublime Text window → I press Super+Alt+K.

4. Expected behavior

sacagawea_chgk command run for me, even if Sublime Text window is not active.

5. Argumentation

For example, I have a plugin that play sounds. It would be nice, if plugin will play sounds, if Sublime Text window is not active. It may save a user time.

6. Did not help

  1. Googling,
  2. Search in Package Control,
  3. I can use AutoHotkey for solving this task, but it program for Windows, not for other platforms.




Once the ST window loses focus, it no longer receives keyboard events, so you will need to find a Python library that can hook into the global keyboard events, or implement it yourself… may be helpful