I'm having extreme difficulty trying to map the M1-M5 macro keys on the Razer Blackwidow keyboard using AutoHotKey.

A similar question was previously asked on this forum but no answer or solution was supplied. That question refers to an earlier question about solving the problem in Linux. The earlier question was solved. Apparently, M1-M5 are regular keys, but they need to be specifically enabled before pressing them will generate a scancode. The Linux solution involved some code that was ported to Python that sends the correct SET_REPORT message to Razer keyboards to enable these keys. The author of the previous Windows question found that it did not work in Windows.

Is there a solution that works in Windows that would enable me to map these keys using AutoHotKey?

  • 1
    Can you provide a link to the previous question? No sense reinventing the wheel for whatever was covered there. It also doesn't make sense to have two identical questions. – fixer1234 Apr 14 '15 at 2:15
  • hi.. sure, here it is: superuser.com/questions/624909/… – NK2013 Apr 14 '15 at 11:49
  • Are you running the Razer drivers? – Elliot DeNolf Apr 14 '15 at 15:04
  • Yes I have Razer Synapse installed - otherwise those M1-M5 keys would be useless – NK2013 Apr 15 '15 at 10:20

This isn't a perfect solution, but it does work. Since you have a Razer keyboard, you should have Razer Synapse installed. With this, you can use the Macro keys to press something you don't normally press, like Control Alt F10, in the Razer Synapse macro editor. Then, you set AutoHotkey to watch for Control Alt F10 (^!F10 in AutoHotkey) and execute whatever you want. Again, not perfect as this doesn't register the macro keys as unique keys, but it does let you push M5 and have something happen. I hope this at least works around your problem until someone gives a better answer.


Try mapping the M1-M5 keys to F13-F17 in your drivers. Then you will be able to make hotkeys against them.

F13::Gosub, SomeLabel
F14::Run, cmd.exe

; etc

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.