Win + number shortcut does not work with OneShot(Win)

I am having some trouble with OneShot and keyboard shortcuts.

When I hold down the Win key and type 4, the Win + number shortcut works - I get a list of all windows in the app that is the 4th item on the task bar. The list appears below the 4th item.

The list only appears while I am holding down Win. Once I let up Win, it goes away.

But when I use OneShot and tap Win and then tap 4, I get a strange outcome. I get a solid grey box pop up where the list should be.

I’ve also tried this macro

MACRO(D(LeftGui), T(4), U(LeftGui));

and I also get the strange outcome.

What is going on here? Please help me fix this.

I assume this has something to do with needing to hold the Win key down to get the list to stay up (holding it down and tapping the 4 key cycles through the list). But why would I get a grey box?

OneShot only holds the modifier key active until the key press event of the subsequent key has been processed. So from the point of view of the host, it sees the Windows key get pressed, then the 4 key, then immediately after that, the Windows key is released.

You could try double-tapping the OneShot Windows key to make it sticky, then when you’re ready to release it, tap it again.