Sublime Forum

Pressing ctrl+c Twice to copy

#1

While I’m here, just a quicky

I’ve bound lots of keys to do various tasks. Since using ctrl+Some_Letter, ctrl+Some_OtherLetter; any function that required ctrl+Some_Letter, now has to be pressed twice.

The upshot of this is when I go to copy a line of text, pressing ctrl+c, It doesn’t copy, and then I go to paste somewhere and get a load of unexpected gobbledygook where ever I’ve *control+v’*d.

Sure the solution is to press ctrl+c twice, but it’d be handy not to have to learn new key presses just because I’ve keybound a different set of keys, one of which happens to contain the same character.

Is this expected behaviour ie: having bound ctrl+Some_Letter, ctrl+Some_OtherLetter to a ST3 function, it’s now required to press ctrl+Some_Letter, ctrl+Some_Letter where previously ctrl+Some_Letter was only required ?

If it is, ok. If it isn’t, reverting to freshly installed state will get rid of the problem, but I don’t use ST3 in the freshly installed state and it would perhaps indicate there’s something wrong at a deeper level, no ?

Toodles, Lozminda

0 Likes

Key binding conflicts ST4
#2

What does sublime.log_commands(True) & sublime.log_input(True) output to the console when you press ctrl + c ?

If something works in a freshly installed state & doesn’t in your custom state, then probably a package/plugin is doing something it shouldn’t.

0 Likes

#3

One possibility is that If there is a command which uses ctrl+c, whatever_key, when you press ctrl+c, ST doesn’t know whether copy should be fired or not, because you may actually want to trigger another command which starts with ctrl+c.

1 Like

#4

Isn’t ST3 capable of waiting a few hundred millisecs (could be a user defined option, it is in linux OSs) to see if there was a second key press…?

0 Likes

#5

Ironically because ctrl+c is less predictable, copying the output from the control panel is not non trivial; almost trivial. Right second try…

key evt: control+c

is the output after pressing ctrl+c

cheers

0 Likes

#6

i dont think so from my simple experiment. ST 4 though.

0 Likes

#7

I could redefine all my keys of course…I’m guessing that’s why they’ve used ctrl+k,ctrl+Some_OtherKey to avoid conflicts with single letter uses. A warning somewhere would have been handy, having ctrl+c suddenly stop behaving as expected has been something else I’ve had to work around.
:laughing: :crazy_face:

0 Likes

#8

I changed all my keybindings: Instead of, for example, ctrl+t, ctrl+s for delete trailing spaces, I’ve used alt+t, alt+s. Similarly for comment structure, ctrl+c, ctrl+s is now alt+c, alt+s. Copy is now back to one press of ctrl c. Hooragh, I hear you all cry, back to original functionality. However alt+t to access tools, doesn’t work at all, now matter how many times I press it.

:crazy_face:

Ps I’ve run into more trouble with the alt key, where as at least if there’s a clash with ctrl+SomeKey you can press that key combo twice, multiple pressings of alt+SomeKey don’t work. Annoying, some more key redefinition required…Fooo

0 Likes

Ctr k + ctr b
#9
0 Likes