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.

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.

  • Thanks for the help. Unfortunately this doesn't work for me (with/without SendMode Input). I tried various combinations. I wonder why is this.. Have you found the other codes in AHK for the special buttons of this keyboard, like Media_Play_Pause (particularly the Favorites button)? I was trying to record these keys and none appeared in the AHK recorder. – Nikos Mar 5 at 1:09
  • Answer updated, the AHK must run elevated. If even that won't help, start switching off interfering software until it starts working. – miroxlav Mar 5 at 9:42
  • Yup, I always run them elevated. Idk what software could interfere other than MS M&K. But I even disabled that key on there (I've done this with other keys). Yeah, it's not going to be that easy to solve this one. – Nikos Mar 5 at 10:26
  • @Nikos – You can do 3 things now: (1) map Send ^!{Tab} to some "innocent" key, e.g. AHK NumPadMult (asterisk key at the num pad) and check if it works. (2) connect your keyboard to another computer (without keyboard drivers) and try the above AHK script there. It should work right away. (Then you can accept this answer.) (3) Then you can return to your computer and start determining what app occupies your keyboard shortcut until you find what was interfering. – miroxlav Mar 5 at 11:54
  • It still doesn't work, no matter which key I use to trigger it. Tried on my laptop too, which is clean, runs the same OS windows 8.1 and it doesn't work there either. There is something going on with Tab. I posted this issue on Microsoft forums too. We'll see if anything can be done about it. I gave you an upvote for the effort. – Nikos Mar 5 at 14:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.