Key Binds - Middle mouse button labeled Sublime 2

Does anyone know if it is possible to associate the middle mouse button with an action in Sublime Text 2?

I know that mouse interaction is possible because you can use the back and forward buttons.

Basically, I was going to use this button to upload a file using the sFTP plugin to reduce the number of buttons that I would need to press from 3 to 1.

I currently have:

{ "keys": ["ctrl+shift+u"], "command": "sftp_upload_file" } 

Ideally, it would be something like this:

 { "keys": ["mouse4"], "command": "sftp_upload_file" } 
+6
source share
2 answers

You can look at the mouse display by opening Packages/Default/Default (operating system).sublime-mousemap . Then you can change what you want and save it in Packages/User .

+12
source

I realized this thanks to the @MattDMo pointer.

I created the file in

Packages \ User \ Default (Windows) .sublime-mousemap

inside the file I put

 [ { "button": "button3", "modifiers": [], "command": "sftp_upload_file" } ] 
+5
source

Source: https://habr.com/ru/post/946699/


All Articles