2

Can Sublime Text plugins handle event of

  • key press (handle any key combination pressed, e.g. Ctrl+Alt+F1)
  • key up/down (handle pressing of keys, and then releasing of keys)

If yes, how can my plugin handle these?

Prog1020
  • 4,530
  • 8
  • 31
  • 65

1 Answers1

1

Yes -- using key bindings, which can be assigned in yourplugin/Default (platform).sublime-keymap.

You can also assign/customize global User Bindings (e.g. keyboard or mouse shortcuts) by creating (or modifying the existing) Default.sublime-keymap file in your Packages/User/ directory.

blizzrdof77
  • 363
  • 4
  • 14
Leonid Shevtsov
  • 14,024
  • 9
  • 51
  • 82
  • 3
    I don't see any mention of handling independant keyup and keydown events. Just support for high level keypress events. – 16807 Jun 27 '16 at 18:20