5

I recently started using GlazeWM which is a tiling window manager for Windows. Even though the guide said not to, I have set my modifier key as the Win key as I have saved Alt key for shortcuts related to applications instead of windows.

Using Win key for this resulted in many problems such as conflicting shortcuts (Win+R is usually for running Windows RUN but with glaze its for resizing windows). I was able to fix 90% of these problems by disabling the windows shortcuts as mentioned in this

But still, one problem remains. Which is, when I switch workspaces with Win + <workspace no.>, the windows start menu pops up from nowhere, this doesn't happen with other shortcuts I have configured, i.e move a window to a workspace Win + shift + <workspace no.>. This only happens when I try to switch workspaces.

I have tried disabling the windows key completely (but reserving the other shortcuts) using AutoHotKeys, SharpKeys and by even editing the registry like mentioned in here, here and here. Nothing worked so far.

My goal is to be able to switch workspaces with Win+1, and Win+2 without the start menu popping up.

2 Answers2

3

I was able to get this to work with the following AutoHotKey script:

~LWin::Send {Blind}{vkE8}
#1::Send {Blind}{LWin Down}1{LWin Up}

Here's what each command does:

  1. ~LWin::Send {Blind}{vkE8} disables the start menu popping up when the Win key is pressed alone

  2. {Blind} disables the visual effects of the shortcut

  3. {LWin Down} sends the Windows key pressing event

  4. 1 sends the number 1

  5. {LWin Up} sends the Windows key releasing event

  • So you set this for every workspace? Unfortunately "This only happens when I try to switch workspaces" doesn't go for me yet, my start menu pops up on every second shortcut I execute. – exic May 17 '23 at 09:07
2

MenuMaskKey says

The following example disables the ability for the left Win to activate the Start Menu, while still allowing its use as a modifier:

~LWin::Send {Blind}{vkE8}
user3419297
  • 3,370
  • 2
  • 11
  • 11
  • Yes, I have already tried this. It disables the Win key but it also disables the ability to switch workspaces. After running this, when I hit `Win+1` all I get is just `1` – Kavishka Gihan Feb 07 '23 at 20:37
  • Probably there are conflicts between the hotkeys in your script. Try the above code first in a standalone script (Use only this code in the script and close all other scripts that may interfere). – user3419297 Feb 07 '23 at 20:55
  • Same result. In fact, I tried without the `~` at the front and it gave me the same behavior. When executed with it (the original one), it does disable the menu when pressed alone but when the Win key is pressed with a number to switch the workspace, start menu pops up again as usual – Kavishka Gihan Feb 07 '23 at 21:10
  • Works fine here. If you did make any changes in the registry or in your system, then undo them. – user3419297 Feb 07 '23 at 21:18
  • Nope, same. Undid all the changes that I had done to the registry, and removed all the other autohotkey scripts that were running. Ran this in a stand-one script. By "works fine", did you mean that this worked with glazeWM for you? Because I am starting to wonder if this is a problem with that. – Kavishka Gihan Feb 07 '23 at 21:43
  • I don't have glazeWM. Try adding `<#1::Send {LWin Down}1{LWin Up}` etc. to the above code (<# means LWin) – user3419297 Feb 07 '23 at 22:06
  • Same effect, Win key alone doesn't bring up the start menu but when you press it with 1 it does – Kavishka Gihan Feb 08 '23 at 05:12