Sublime Forum

Ctrl+1, ctrl+2 not working?

#1

Hi

I think ctrl+1, has stopped working? I have two panes with multiple tabs open, if I type ctrl+1, it turns the two panes into one large pane, destroying the organisation of those two panes (which I then have to return to their original organisation, by opening another pane and dragging everything about until I have the original situation).

I’m sure that isn’t meant to be their functionality, ctrl+1 would “put the focus” on pane 1 and ctrl+2 would “put the focus” on pane 2 without changing anything. Is that the expected behaviour (what I’ve just described) ? If so, some thing’s changed.

If it is the expected behaviour (I’d swear blind it wasn’t , I’m sure it used to work as above, but hey), how do I switch focus from one pane to another without destroying them please ?

Cheers Lozminda

0 Likes

#2

Have you tried reverting to a freshly installed state? My guess is you have custom key-bindings or a plugin interfering. Which version of Sublime Text are you using and on which platform?

0 Likes

#3

Open the sublime console (ctrl + `) and run sublime.log_input(True) & sublime.log_commands(True) and then try the key binding for focusing the panes and see what is logged to the console. Ideally, it’s the key binding for focus_group command so may be some other command is getting triggered.

0 Likes

#4

@bschaaf. Following the instructions in the link you posted, it says “remove the data folder”.

As you can see from the Location, I’m in the right place (according to the instructions for Reverting to Initial State), which folder is the data folder that i should remove ?

Ta

0 Likes

#5

@UltraInstinct05.

After following your instructions, this is the output I get, after pressing ctrl+1:

command: set_layout {“cells”: [[0, 0, 1, 1]], “cols”: [0.0, 1.0], “rows”: [0.0, 1.0]}

This (according to the default keymap) should be the result of alt+shift+1

Perhaps I do have a keybinding conflict as I redefined the the alt+shift+DIGIT to ctrl+space+DIGIT having first used

		{
		"keys": ["alt+shift+1"],
		"command": "noop"
	},

to turn them off.

I need alt+shift+2 to do something else which I’ve also redefined and that works as does ctrl+space+DIGIT.

So everything works as expected except for crtl+1 etc, which bizarrely are the controls I haven’t touched. I’ve had an idea …

0 Likes

#6

I tried copying the keys from the default to my keybindings for crtl+1, ctrl+2 etc eg
{ “keys”: [“ctrl+1”], “command”: “focus_group”, “args”: { “group”: 0 } },
thinking that might cure the problem, but it’s still reading ctrl+1 as shift+alt+1

Drat!

20 mins later (ish). So there’s a work around, I’ve redefined all my ctrl+DIGITS as ctrl+alt+DIGIT, eg ctrl+1 as ctrl+alt+1, and I now get the desired behaviour ie focus group etc.
But I get the feeling there’s a deeper problem and I’m guessing by your initial reply(ies) that what I’ve described isn’t expected behaviour… I should be able to redefine default keys and not get “knock on” behaviours ?
All the best, Lozminda

Ps ctrl+shift+DIGIT has worked as expected throughout…

0 Likes

#7

You might try the FindKeyConflicts plugin, it’s helped me a time or two to track down which keybindings are associated with which plugin and highlight any conflicts.

0 Likes

#8

It’s not very clearly documented, but the folder you’re in (sublime-text-3 here) is actually the “data” folder; it’s the place all of your user data is stored. Moving it away from that location or changing the name will make Sublime re-create it fresh on next launch.

See also:

0 Likes

#9

Morning.

Yep, having reverted to freshly installed state, the problem goes away, ctrl+1,ctrl+2 now work as expected…

0 Likes

#10

ctrl+left and right arrow have just stopped working, completely randomly. Just in the middle of my work flow, haven’t touched ST3, was hoping to get some work done !

I’ve gone into the control panel and done sublime.log_input(True) & sublime.log_commands(True) and the commands are being registered by ST3. The ctrl key is working, as the command is being registered and it works for other commands. Clearly there’s something wrong…

Reverting to a freshly installed state gets rid of the problem, but that’s not a cure…

Cheers Lozminda

Ps As with ctrl+1 etc…

PPs Also I’ve disabled most of my packages and am down to the bare min, package dev, control, resource viewer, rainglow, jack, multicommand. diffy, trailing spaces… Still no change…

0 Likes

#11

Which command is being logged when do ctrl+left?

0 Likes

#12

Yes. I have to put in at least ten characters so there they are :+1::ok_hand::vulcan_salute::call_me_hand:

0 Likes

#13

I wasn’t asking whether a command was being logged, I was asking what was being logged. Can you post the console output when pressing ctrl+left with sublime.log_input(True) and sublime.log_commands(True).

0 Likes

#14

Sorry, trying to do two things at once…

key evt: control+right
command: power_cursor_select {“forward”: true}
key evt: control+left
command: power_cursor_select {“forward”: false}

:blush:

Ps ctrl+left/right seems to be conflicting with power cursor, I redefined the power cursor controls because they conflicted with some other keys. The redefinitions work fine, but again there seems to be some “knock on effects”, which also don’t seem to come into effect until I reboot. Could there be something in the order in which ST3 reads keybinding redefinitions ? Just a thought…

:roll_eyes: :grimacing: :scream: :sigh: oh no sigh emoji !! :smiley:

PPs Not having ctrl+left and right is very disruptive to the old workflow, esp in multi cursor, sorry to moan, but this is a bad one, seems small but I use that key combo sooo much

0 Likes

#15

I’ve found the solution, if this be of use to anyone, aha ha ha :female_detective: (I was hoping for a pirate emoji)

In essence you can’t use, for example, “keys” (key combinations) such as ctrl+space+1, even though it works. For some reason it appears to cause “conflict deep in the heart of ST3”. To be fair I was wondering why the +1 was highlighted by the keybinding file, even though it saved without error.

{ “keys”: [“ctrl+space+left”], “command”: “power_cursor_select”, “args”: { “forward”: false } },

The above is “wrong”.

I’ve rewritten my keybindings (using the above as an example) in the following way

{ “keys”: [“ctrl+space”,“ctrl+left”], “command”: “power_cursor_select”, “args”: { “forward”: false } },

and the various conflicts have disappeared. Obvs they’re not the same key presses, but close enough. I have ctrl+left/right back. I’m guessing I could also redefine some of my redifinitions…

If anything’s wrong in the above or folks have some other thoughts on the entire keybinding scenario I’d be happy to hear them.

Cheers, Lozminda

0 Likes