Sublime Forum

Close Quick Panel (window.show_quick_panel) on key release

#1

Hey,

I am new to sublime text plugin development, I am developing a plugin that involves opening a quick panel on pressing certain key binding. I want the panel to be open only as long as the keys are pressed and once the keys are released I want to close. I’ve figured out I can fire the ‘hide_pannel’ command to close my Quick panel but I want it to fire after I release the key combination.

For example lets say, I want the quick panel on pressing ctrl+p and I want it to close after I release ctrl.

So I was thinking if I fire ‘hide_pannel’ command after release ctrl should do the trick, but I couldn’t find how I can fire a certain command on key release instead of key press. If there is any other solution or workaround other than what I was thinking please do let me know.

0 Likes