M1-M5 are in fact regular keys - they just need to be specifically enabled before pressing them will generate a scancode. tux_mark_5 developed a small Haskell program which sends the correct SET_REPORT message to Razer keyboards to enable these keys, and ex-parrot ported the same code to Python.
On Arch Linux systems the Python port has been packaged and is available from https://aur.archlinux.org/packages.php?ID=60518.
On Debian or Ubuntu systems setting up the Python port of the code is relatively easy. You need to install PyUSB and libusb (as root):
aptitude install python-usb
Then grab the blackwidow_enable.py
file from http://finch.am/projects/blackwidow/ and execute it (also as root):
chmod +x blackwidow_enable.py
./blackwidow_enable.py
This will enable the keys until the keyboard is unplugged or the machine is rebooted. To make this permanent call the script from whatever style of startup script you most prefer. For instructions on how to set this up in Debian have a look at the Debian documentation.
To use tux_mark_5's Haskell code you'll need to install Haskell and compile the code yourself. These instructions are for a Debian-like system (including Ubuntu).
Install GHC, libusb-1.0-0-dev and cabal (as root):
aptitude install ghc libusb-1.0-0-dev cabal-install git pkg-config
Fetch the list of packages:
cabal update
Install USB bindings for Haskell (no need for root):
cabal install usb
Download the utility:
git clone git://github.com/tuxmark5/EnableRazer.git
Build the utility:
cabal configure
cabal build
Run the utility (also as root):
./dist/build/EnableRazer/EnableRazer
After this you can copy EnableRazer binary anywhere you want and run it at startup.
Immediately after execution, X server should see M1 as XF86Tools, M2 as XF86Launch5, M3 as XF86Launch6, M4 as XF86Launch7 and M5 as XF86Launch8. Events for FN are emitted as well.
These keys can be bound within xbindkeys or KDE's system settings to arbitrary actions.
Since your keyboard might be different, you might need to change the product ID in Main.hs line 64:
withDevice 0x1532 0x<HERE GOES YOUR KEYBOARD's PRODUCT ID> $ \dev -> do
I have the same issue on OSX. I think the problem isn't related to the keyboard or synapse but to OSX. Indeed, on a MAC functions keys use the "shortcuts" (lights, volume) without fn pressed.
You should try to go in System Settings, keyboard and then select "Use F1, F2 as standard function key"
Best Answer
Once you have Synapse already installed, go to your task manager and end any Razer Synapse related processes. Make sure to check the background processes also.
When you've done this, unplug your keyboard from your computer, then re-launch Synapse. Once you're greeted with the menu saying to connect a Razer device, plug your keyboard back into your computer and it should recognize it.
if that doesn't work you can Go to control panel- device manager- search for your razer device which might be under controllers or under unidentified usb device. right click and click uninstall. if that doesnt work right click - uninstall and click remove drivers also. then restart your computer , open razer synapse, connect your device and wait for synapse to detect it.