Temporary disable shortcut

Hey everyone!

I noticed that my TypedActionHandler doesn't receive events for keys that are used in active keymap. For example, if I map ',' char, then I won't get event when I type it in the editor.
Is it possible to ignore all actions mapped to a given char based on state of the editor? In other words if the editor is in some predefined state, I'd like to have the said char passed to the editor instead of invoking mapped action.
Alternatively, is it possible to temporary unlink char from all actions, so that it would be passed to active editor.
Thanks!

2 comments

If your action marks itself as disabled in its update() method, the actionPerformed() method will not be called and the keyboard shortcut will be handled by the editor.

Why are you assigning the "," shortcut to an action? This is not an intended way to accomplish anything.

0

It might not make sense out of the context. I'd like to have vim leader key behavior. Keymappings are only active when editor is in the normal mode.
Mapped actions are not mine, so I guess I can't disable them.

0

Please sign in to leave a comment.