How to detect Ctrl+S being pressed? Follow
Answered
I have a requirement to perform an action on Ctrl+S. I tried to declare the action and the short cut in my plugin.xml but since this shortcut is already used by `SaveAll` it does not work.
<action id="myActionID" class="com.example.myClass"description="bla">
<keyboard-shortcut keymap="$default" first-keystroke="ctrl shift S" replace-all="true"/>
</action>
Note that I don't want to perform this action when the files are saved (I am aware of ways to listen for this event), I really want to detect Ctrl+S. Is there a way to do this?
Please sign in to leave a comment.
Hi Fabian,
Overriding the core IDE functionality shortcut doesn't sound like a good idea. What is your use case?
I found out how to do it, so here it is for future programmers.