0

I am trying to create a, what I call, 'Task Switcher' macro, ideally using the useless for me 'Media Play/Pause' button on my 'Microsoft Natural Ergonomic 4000' keyboard. I have no need for the default features of this button and as such I want to rebind it. My most necessary macro is, as I mentioned, Ctrl+Alt+Tab (or Alt+Tab).

I have used the latest Microsoft Mouse and Keyboard Center program to perform this rebind with no success. You can see that below: enter image description here I believe I am doing everything correct; unfortunately there may be a bug with the Tab key in this program and I cannot find a way to circumvent it (I tried other keys of the keyboard too; Alt+Tab won't work). I also tried to increase the delay up to 200ms but it still won't work. I tried the 'Toggle' and the 'Press and Hold' modes as well and nothing.

Then I tried to use the trusty AutoHotkey to intercept the 'Media Play/Pause' button press, get its scancode and then assign it to the Alt+Ctrl+Tab macro, which works just fine in AHK (Send, ^!{TAB}). However when I record keystrokes Autohotkey doesn't recognize the scancode for the 'Media Play/Pause' button (highlighted in blue in the picture above), or any other special buttons from this keyboard for that matter. I believe this is because a special button like this is mapped to a custom HID input device and trying to figure this out would lead to a rabbit hole that goes too deep that I can bother with right now.

Does anybody know how I can assign the Ctrl+Alt+Tab macro/hotkey to a special button of this Keyboard? If you do, kindly share. Thank you.

Edit

Solved by user3419297 here.

Jackdaw
  • 1,834
KeyC0de
  • 229

1 Answers1

1

Using exactly the same keyboard model, I can easily re-map ⏵/⏸ (Play/Pause) button in AutoHotKey like this:

Media_Play_Pause::Send ^!{Tab}
+Media_Play_Pause::Media_Stop
^Media_Play_Pause::Launch_Media

...and your Ctrl+Alt+Tab idea works nicely. So does the rest of examples where I am demonstrating use of Shift and Ctrl modifiers.

But I admit I do not have Microsoft Mouse and Keyboard Center installed to avoid any interference (and to save some system resources).

For sake of completeness of this answer, I need to note that I am using the following modification to Send mode at the top of the AHK script:

SendMode Input

And make sure that you always run the AHK elevated (i. e. As Administrator).

I verified that the following script catches ⏵/⏸ (Play/Pause) button nicely in Windows 10, AHK (version 1.1.25.01) running elevated:

SendMode Input
+Media_Play_Pause::msgbox Shift+PlayPause
^Media_Play_Pause::msgbox Ctrl+PlayPause
Media_Play_Pause::msgbox PlayPause

After your further research, the problem was not in capturing ⏵/⏸ (Play/Pause) button but in executing of Alt+Tab which needed special technique for Windows 8.1. Capture itself went just fine.

miroxlav
  • 14,845