Sublime Forum

Quick Switch Project shortcut not working on Ubuntu

#1

I’m cross posting this from askubuntu but essentially does anyone know why the cltrl+alt+p shortcut doesn’t work in Sublime Text when running Ubuntu 18.04.4 LTS?

I’ve worked out that it’s being swallowed before it’s getting to Sublime because the key combo is never being registered but I can’t work out how to get it working. Can anyone advise?

0 Likes

#2

From a Sublime perspective, pretty much the only ways forward are to get the system to stop eating the key so that the default binding will work, or customizing the binding to use a different key.

I’m not an Ubuntu person though, so I’m not sure how to get it to release the key. XFCE exposes a window manager level input configuration that lets you specify what key to use for each of the actions, but it sounds like the Ubuntu WM doesn’t have something like that out of the box?

0 Likes

#3

I use Ubuntu 18.04 and it does not have a binding for ctrl+alt+p by default. Either you’ve added a keybinding to gnome or another application is eating the keybinding before it reaches Sublime Text. Just to be sure it’s not a Sublime Text problem you can check if it’s getting the event by typing sublime.log_input(True) into the console.

0 Likes

#4

Thanks @bschaaf - I’ve checked that which confirms it’s Ubuntu. I’m not aware of any keybindings that I’ve manually set that could override it. I’m fairly new to Ubuntu but tried gsettings list-recursively | grep -E 'keybindings' and Ctrl+Alt+P wasn’t listed anywhere. :thinking:

0 Likes

#5

Hi
Am using Mint Mate, which is based on ubuntu, i think ?? ctrl+alt+p works ok for me in ST3 . Could it be a keyboard issue or some other weirdness. I know not very helpful.
I’ve tried showkey and screenkey, (for linux) though showkey worked (you need to type: sudo showkey in terminal) it only gives one key press and not combinations and I couldn’t get screenkey to work at all. All these in the name of keyboard diagnosis. Still not very helpful…Apologies
There is in terminal (I’ve just found) crtl+v, then press the key combination you’re interested in, and it should mirror what you’ve pressed crtl+alt+p => ^]P
(no other key combination of alt, shift or ctrl and p gives the above) At least then you know that is not a HardWare problem ??

0 Likes

#6

So I tried Screenkey (took a couple of times to start it but it did work). It recorded the shortcut, but sublime with the sublime.log_input(True) did not. You can see that Ctrl+Alt+i registered, Ctrl+Alt+o and Ctrl+Alt+p did not, then Ctrl+Alt+l did.

0 Likes

#7

Ok, thanks for all the help everyone. I started checking all the configuration for anything with global key hooks (Ubuntu built in, checked Terminal). When I got to something called ClipIt I noticed I was unable to launch the UI anymore.

Turns out it had attempted (and failed) to bind to the key shortcuts that weren’t working, but because it had failed they didn’t appear anywhere/do anything. In the unlikely event that someone else hits this with the same problem here’s a GitHub issue I found https://github.com/CristianHenzel/ClipIt/issues/97

1 Like

#8

Good news, it might be worth hitting the solved button maybe ?
All the best L

0 Likes

#9

Thanks - I didn’t know that was an option :slight_smile: Done

0 Likes