Sublime Forum

[user error sorry] Custom invoking of "paste" command doesn't work on cut text; only copied

#1

I tried making a custom shortcut for pasting text by creating this keybind for the mouse middle click:

{ "keys": ["mouse3"], "command": "paste" },

But it seems to work only for text that was copied, and not for text that was cut. So copying and then pressing middle click, pastes the text. But cutting and then pressing middle click, does nothing.

If relevant, the build is 3211 on Linux.

(i also previously posted a question about this on stackoveflow, because i’m not sure if i just need to do some extra step, or it’s a bug…)

0 Likes

#2

There is no mouse3 in keybinding. Don’t know why your pasting even works for copied text (but not a cut one).

A Default.sublime-mousemap file should be used I believe.

[
    {
        "button": "button3",
        "command": "paste",
        "count": 1,
    },
]

.sublime-mousemap docs from https://gist.github.com/Ultra-Instinct-05/e1ca9a4d48641cc6c0af46fec0010611

0 Likes

#3

My apologies, after playing around with your solution (and without it) I now realised it’s my native OS behaviour that is doing this. Sublime doesn’t even get the middle click event, it seems.

0 Likes