I'm writing a plugin for IntelliJ to handle a custom language in a specific file type and it includes about 20 unicode characters which need to be bound to hotkeys for usability. I have two to three problems getting these wired up:
- I can't find any code on how to utilize EditorActionHandler or EditorAction to bind a key combination and insert a character at the caret when the file has focus in the editor (or a pair of characters around a selection if there is a selection.)
- I'm not sure if that's the right approach with so many hotkeys (I'd prefer to have them in an array or even an if/else-if block than to make 40+ separate classes for actions and action handlers - I'd also like to be able to adjust these dynamically based on the output from the lexer since the language itself may define new hotkeys for interaction.)
- Thus far I've only been able to catch typed keys in the editor, but not key combinations.
Any help would be appreciated, especially with code samples since I'm new to plugin development for IntelliJ and can't find any related code samples in the tutorials or a comprehensive API reference - just some short writeups and samples on the more generic seeming AnAction overrides to add menu items.