Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

Is there a software, command or way to know what keys from an external non apple keyboard are being mapped to which mac keys?
And also is there a way to remap the shortcut keys of my keyboard: back, forward, home, search & mail?
The play and volume keys on my keyboard do work as expected, but the other keys don't seem to de anything.

PS: I have this one: enter image description here

share|improve this question
    
To be clear, are you referring only to function keys and modifier keys? –  Austin May 11 '11 at 17:54
    
I figured out that print screen, scroll lock and pause map to F13 - F15, so the only useless keys there are left are the shortcut keys, i.e. navigation, mail, etc. –  Petruza May 12 '11 at 15:19

2 Answers 2

up vote 5 down vote accepted

ControllerMate does this. At work I use the Microsoft Natural ergonomic keyboard and a Logitech mouse. ControllerMate has hardware profiles for both, and I have many of the MS-specific keys remapped to other functions.

Like yours, my keyboard also has an otherwise useless Mail button. With Controllermate open, if I press the Mail button while viewing the Microsoft keyboard profile, the list of available key sequences automatically jumps to the one it just received. You can then program that key to do whatever you like, even when ControllerMate isn't open.

enter image description here

share|improve this answer
    
even when ControllerMate isn't open so they key mapping must be in a configuraion file of some kind right? do you know which one or if there is one at all? –  Petruza May 12 '11 at 15:18
    
ControllerMate has a small-footprint helper app running in the background at all times, presumably monitoring I/O. The app is closed, but the helper app remains running. –  michaelmichael May 12 '11 at 17:14
    
oh ok [padding...] –  Petruza May 13 '11 at 16:38
    
+1 I believe this is the best way to do it -- I was just trying to provide more information for the OP in my answer and didn't mean for it to become the "accepted" answer. :/ –  Austin May 13 '11 at 17:00
    
you're right. fixed. –  Petruza May 14 '11 at 13:08

I think the answer about ControllerMate is a good one, but since you asked in a comment about a configuration file, I'll mention that the most powerful, "raw" way to configure your keyboard settings is by creating a custom keyboard layout. I would guess that this is how apps like ControllerMate modify keyboard keys, but I can't say that for sure.

You can use an online generator for this purpose (it's old, but the .keylayout files it generates still work under Snow Leopard) or a GUI like Ukelele (free).

When doing it this way, you would add the resulting .keylayout XML file to /Library/Keyboard Layouts (for use by all users) or ~/Library/Keyboard Layouts (for use by only the current user). Then you would enable the custom layout in System Preferences -> Language & Text -> Input Sources.

For your third-party keyboard, it would still be tricky to find out the key code in a given mapSet for those "useless" keys for "Back", "Forward", "Mail", etc. Personally, I would go with a GUI program that allows me to "press and set" so there's no extra research or guesswork on my part.

So in short, I am not saying that this method is easier or even more powerful than using an app like ControllerMate, but it should at least help explain how keyboards can be re-mapped under OS X without a "middleman" program that has to stay running in the background.

share|improve this answer
    
Thanks! I actually use a keylayout I made with ukelele, and tried the shortcut keys but ukelele doesn't seem to notice them at all. What do you mean by mapSet ? –  Petruza May 13 '11 at 16:42
    
A mapSet "maps" virtual codes to each keypress so they can be assigned to a character in the .keylayout XML file. I don't believe any of the virtual keyboard layouts in Ukelele will have virtual buttons to match those extra Microsoft keyboard keys at the top, so it might not be possible in that program. ... Have you tried ControllerMate? It seems to do exactly what you want -- you press a "strange" key on your keyboard, and it lets you assign it to whatever you want. –  Austin May 13 '11 at 17:00

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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