1
votes

Windows 8 allows you to launch/minimize/restore applications in the taskbar with Win+.

I'd like to mimic this exact behaviour using the numpad instead, but I couldn't find how to reference to the applications in the taskbar: searching for it gives me tons of unrelated results, people aiming to do stuff with the taskbar, not concerning launching applications.

"Just remapping" the keys, like @MCL suggested, gives a weird result: #Numpad2::#2 actually behaves like win+shift+2, instead of the plain win+2, which has a different behaviour (i.e. if the app is already open, it will open a new window instead of minimizing the active one).

No clue why it does that.

1
It surely would be helpful if you explained how you do it manually. - MCL
@MCL I'm not sure what you are asking. Currently Windows launches/minimizes/restores taskbar program #2 if you hit Win+2. I would like to achieve the same effect using the numpad instead (obviously for every taskbar program, "2" was just an example, i.e. I do not want to specify application names). - o0'.
So it seems like all you have to do is to remap NumpadN to Win+N. Have you tried that? - MCL
@MCL oh, I was thinking about a more convoluted way, but it makes sense. Unfortunately it still behaves weirdly, as I'll explain in my edit. - o0'.
@MCL nvm solved, I'll explain - o0'.

1 Answers

0
votes

Problem is that AutoHotKey doesn't match the actual physical key, but it searches for the symbol produced by that key with the current keyboard layout.

Since my keyboard layout has the numbers in the shift position, it sent also the shift key.

I fixed that by changing the script to:

#Numpad1::#&
#Numpad2::#"
#Numpad3::#$
#Numpad4::#{
#Numpad5::#}
#Numpad6::#-
#Numpad7::#/
#Numpad8::#(
#Numpad9::#)

which matches my layout.

However it would have been a better solution to be able to match a physical key, regardless of its output.