Mechanical Keyboard Layout Not Recognized So I bought this keyboard. Armaggeddon Black Hornet MKA-3 mechanical gaming keyboard. Here's the link to it.

http://armaggeddon.net/gaming-keyboards/black-hornet-black/

They provide Windows drivers so my it works nice on my PC. I use both Linux and Mac OS at my workplace, it works great with my Linux without any configuration but surprisingly not functioning well with my Mac. Although I don't use mac very, I still want to be able to use my keyboard when I have to use Mac sometimes.

Here's what happened, I plugged in the USB, reboot to Mac, can't type password at the login screen, I plugged in my apple keyboard, and logged in. The system detected my new keyboard, asked me to press the key right to the left shift key, after I pressed it for several times, it says the keyboard is not recognised and I have to choose one manually. 

So I chose US standard layout, but the key mappings are all messed up. I mean you have 8 when you type 1, and you see 's' when you press space.

All my other keyboards are working fine, I want to ask is there anyway in mac you can manually 'program' the key mappings, or what should I do to make it work. 

Here's some a list of wrong key mappings.

1 = 8
2 = 9
3 = 0
4 = 'Enter'
5 = 'Not Sure'
6 = 'Back space'
'Backspace' = \
' = q
, = 4
. = n
p = f
a = d
i = b


Thanks for any help.
Perhaps Ukelele is what you're looking for? It's a nice front-end to make custom keyboard layouts for Mac.

Also the solution listed here at SO might be helpful if it's more of a problem with the non-letter keys.