I've found how to bind my own command to ctrl+click, but now I'm struggling with obtaining current position of the cursor. Doing view.sel()[0] is obviously unreliable, so I'm looking for a better way.

A great solution would be to get mouse coordinates of the click, convert them to text coordinates via view.layout_to_text and do my stuff. After enabling sublime.log_commands I've noticed that Sublime passes mouse coordinates to drag_select handlers (e.g. "command: drag_select {"event": {"button": 1, "x": 582.5, "y": 274.5}}"). However, I've been unable to get hold of them - neither bound by press_command, nor by command in sublime-mousemap entry, my command doesn't receive the "event" argument.

I tried to play with this but i had issues converting reliably (x,y) to test position (it was some times ago but maybe things are better now ...). So in the end what i did was pass the arg to the drag_select command, and then use view.sel()[0].This was for a plugin to emulate a kind of drag&drop (more a sel&click) before it was implemented: you can find the very simple source here: https://bitbucket.org/Clams/pasteselonclick/src

I don't think wbond's package manager does anything with dependencies, but I just wrote a cool mouse-callback thing:https://gist.github.com/2979613It lets you inherit from MouseEventListener and then you get an on_pre_click with the args and an on_post_click with the position in the file where the user clicked.I think I might upload it to github and make it a real repo, and then I'll make my ScrollOffset plugin ignore mouse input. Now that would rock!

@adzenith I was checking out your ScrollOffset plugin earlier today. I use a similar plugin that always keeps the cursor centered, so I thought your "mouse-callback thing" may be solving similar problems as the ones I am encountering. Honestly, I can't figure out what it's supposed to do. What I was looking for is disabling the click+hold for selection so that I could only use mouse button 1 to change the cursor's location. (I would then use shift+click for selection). With the aforementioned plugin, my thumb has a bad habit of tapping the touchpad, selecting chunks of text which I then gleefully proceed to overwrite without noticing... Hope this makes, sense

The mouse-callback thing is not yet integrated into my ScrollOff plugin, which may have explained what you were seeing.My plan was to capture on_pre_click, disable ScrollOff for the next on_selection_modified, then capture on_post_click and re-enable. This would make it so that clicking wouldn't scroll the display, allowing normal selections with the mouse. Does that make sense?