0

The default behavior for the shortcut <Windows Key + Number> is to open the respective application on your taskbar. I have this behavior overridden by the AHK script posted here, which changes the shortcut to switch between virtual desktops instead.

This script has been working for me for a long time, but when I recently switched editors from emacs to VSCode, I have encountered the problem that whenever VSCode is focused, the shortcut reverts to the default behavior of opening the taskbar application.

If it matters, I am using VSCode through WSL, but I don't think it's relevant since the problem still occurs when I use VSCode on the Windows side.

I researched totally disabling the native shortcuts, but it doesn't seem like there is a way to disable individual Win+X shortcuts on Windows - the Windows key is either totally disabled or enabled. This problem is very annoying, because I frequently switch desktops and I keep opening Outlook instead of the desktop with my browser in it.

Any help or suggestions would be greatly appreciated.

1 Answer 1

0

The fix here worked for me. I think it was a problem with VSCodeVim (not sure why I didn't consider that might be the culprit.)

I added the following to my settings.json:

"keyboard.dispatch": "keyCode"

2
  • 3
    Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.
    – Community Bot
    Commented Apr 8, 2022 at 16:01
  • 1
    Please consider editing in the steps you took to resolve your issue. It's Stack Overflow, but that doesn't mean the question/answer linked will always be there. Commented Apr 8, 2022 at 16:30

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .