Sublime Forum

Change focus group keyboard shortcut not working in Build 4107

#1

Just downloaded Build 4107. Looks great!

However, it appears the shortcut to change focus groups (Ctrl + 1, Ctrl + 0, etc.) is no longer working.

I’m seeing the same issue on both Mac Mojave (10.14.6) and Mac Catalina (10.15.7).

0 Likes

#2

That works for me here; does it work in Safe Mode?

0 Likes

#3

Actually, it looks like it’s some issue with the numpad. Using the number keys at the top of the keyboard works fine.

0 Likes

#4

Have you tried Numlock (if you have that key)?

0 Likes

#5

Indeed, if Numlock is not turned on, 1 and 2 on the numeric keypad will report as end and down. If Numlock is enabled, those keys will report as keypad1 and keypad2, which is distinct from the 1 and 2 that the keys along the top of the keyboard generate.

In that case, adding key bindings such as the following to your user key bindings file would get things working again. Similar changes would be needed for other keypad related keys as well.

    { "keys": ["ctrl+keypad1"], "command": "focus_group", "args": { "group": 0 } },
    { "keys": ["ctrl+keypad2"], "command": "focus_group", "args": { "group": 1 } },
    { "keys": ["ctrl+keypad3"], "command": "focus_group", "args": { "group": 2 } },
    { "keys": ["ctrl+keypad4"], "command": "focus_group", "args": { "group": 3 } },
    { "keys": ["ctrl+keypad5"], "command": "focus_group", "args": { "group": 4 } },
    { "keys": ["ctrl+keypad6"], "command": "focus_group", "args": { "group": 5 } },
    { "keys": ["ctrl+keypad7"], "command": "focus_group", "args": { "group": 6 } },
    { "keys": ["ctrl+keypad8"], "command": "focus_group", "args": { "group": 7 } },
    { "keys": ["ctrl+keypad9"], "command": "focus_group", "args": { "group": 8 } },
1 Like

#6

Thanks @OdatNurd. I’ll play around with that. I’m using a Logitech MX Keys keyboard with a Mac. There may be some issue with numlock. I can type numbers with the number pad, but toggling the numlock key doesn’t seem to be doing anything. Odd.

At any rate, thanks all!

0 Likes

#7

In that case you can try opening the console with View > Show Console and use sublime.log_input() to toggle input logging on, then press those keys and see how Sublime is reading them. That might help clear things up a bit.

0 Likes

#8

Awesome. Thank you!

0 Likes

#9

Have you changed key assignments with the Logitech Options app?
Or perhaps you need to turn Numlock on with the Options app.
Just guessing - I don’t have a Mac but I do have the Options app for my mouse.

0 Likes

#10

@Jackeroo No, I haven’t. It looks like there is no numlock option for a Mac keyboard. The numlock key is “clear” on a Mac keyboard.

When I log the keystrokes as @OdatNurd suggested, they indeed show up as “ctrl+keypad2”, etc.

Looks like the solution is to just add those bindings that @OdatNurd included above.

1 Like

#11

If it works, use it. It’s probably better than using Options, which is a large app (~200MB). It is strange that ST4 disabled the key combination if it was working in ST3.

0 Likes

#12

I think they became more specific than they used to be so that they have distinct keys to bind, but I’m not entirely sure.

0 Likes