Prerequisites: download/purchase ControllerMate from OrderedBytes for the said $ 15 and get it installed (requires a restart). Open the application (ControllerMate). Oh, and maybe do read up a bit about the app you are buying (RTFM).
First we will create a new controller page by pressing the green P button in the bottom left of the main window. In the Inspector Window, you can change the name of the page to something appropriate - like in the screen shot, to MX_Revolutions, as this is the base setup for the Logitech MX Revolution mouse. This will be the final result (exclusive sneak preview!):

Next, in the Palette, where Controllers should be selected from the drop-down menu, click (! - don't drag it into the main window) on the input device you want to remap (in our case, the "USB Receiver Logitech Mouse"), which should bring you to the following view in the Palette seen to the left.Here it gets interesting - if you click a mouse button or do anything with your mouse (or whatever input device you're mapping), the view scrolls to that element and the corresponding element gets highlighted for the duration of its activity. Drag all controls you want to modify into the main window; in the case of the Logitech MX Revolution, without changing the behavior of the left and right mouse button and the scroll wheel, we need the following controllers:
- Button #9 - side-wheel forward motion
- Button #11 - side-wheel backward motion
- Button #13 - side-wheel click/press
- Button #5 - forward button
- Button #4 - backward button
The little button beneath the MX Revolution scroll wheel is tricky: it's not in this list! To get it, we need yet another controller set; go back to the main controller view (click on the Controllers button...) in the Palette and select "USB Receiver Logitech Consumer Control". Here are tons of controllers listed - we need "AC Search", which is mapped to the little button. Nice - just press the button, and the view brings you directly to what you're looking for! Drag this "AC Search" building block into your main window, too.
A hint: the auto-scrolling feature in the Palette view is cool, but if you have a mouse mapping in there too, it gets impossible to select anything, because it scrolls to the mouse X- and Y-axis controllers each time you use the mouse of that input device. This happened to me with my wireless keyboard with a built-in trackball mouse. To deactivate auto-scrolling for certain elements, select "Controller Types" in the main window menu and choose your controller type (e.g. "Wireless Keyboard/Mouse" for my trackball keyboard), then select the controller which is getting you mad (X-Axis, Y-Axis and the Buttons #1-3 for me) and "un-tick" (hey, is there a valid English word for this?) the "Automatically scroll in Palette window" check box, just as in this example, where I disabled auto-scroll for the X-Axis:

Well, assuming you have all controllers you want to manipulate back on your main view, it is time to tell them what they should be doing. In my example, I am enabling horizontal scrolling for the side-wheel, Firefox back/forward for the back and forward buttons, mapping a middle mouse button click to the click of the side-wheel (the click of the scroll-wheel on the MX Revolution only makes the wheel go from "rasterized" scrolling to something I would call "freewheeling" but has no system event, this is hard to explain if you don't know the mouse...), and finally I set the small button below the scroll-wheel to simulate a press of the F6 key (I have Yojimbo installed and F6 opens the search in Yojimbo system wide; these are btw the only two other apps I really encourage you to consider worth their money: Yojimbo and TextMate). Well, to get the sideways scrolling to work on the side-wheel, we have to auto-repeat the clicks (moving the "side-wheel", which is actually a button, not a wheel, only produces a single-press signal - well, because it IS a button...), so we attach an Auto-Repeater from the Timers Palette to the two Button #9 and #11 controllers and change their repeat rate to 30 per second in the Inspector window (while having the Auto-Repeater selected in the main window, naturally). To the Auto-Repeater we then attach a Scroll Wheel action from the Outputs Palette. In the Inspector view of the Scroll Wheel action, we change the action to a Horizontal Wheel and in Left and Right Direction, respectively. Finally, adjust the Steps count to 5 (the default, 1, tends to be kind of "slowish", but see yourself...). Voilá, go to a window with a side-scroll bar and check. Should be working just nicely. Mapping all other buttons is rather simple: we only need the Outputs Palette: Attach a Mouse Button output to Button #13 (the click of the side-wheel) and change its Inspector property to "Middle Button"; Attach a Keystrokes output to all others (Button #4, Button #6, and the AC Search) and record the keystrokes for each in the respective Inspector window: "CMD-[" for Firefox' history back, "CMD-]" for history forward, "F6" for the Yojimbo search. Done! Your result should look something like this:

OK, now for the second part, mapping Microsoft keys for a M$ keyboard (back/forward in browser history, Internet, e-Mail, Home, and the music controls) to actually do something on a Mac, create a new Page which should end up looking something like this with all controllers and setup:

I will not go into a stepwise detail of creating this layout, as it is basically the same as for the mouse above. You attach Keystroke Outputs to the browser history back and forward buttons and record them to "CMD-[" and "CMD-]", just as above. The other buttons are a bit more tricky: you need to attach AppleScript "Runs an AppleScript" Palette building blocks to them and then, in the Inspector window of each building block, store AppleScript commands to each block as appropriate. I will here post the necessary AppleScript, but I assume you either understand the script or just copy-paste it and are happy that it works; OK, here's the magic:
Activate Firefox
tell application "Firefox"
activate
set open_windows to (count of every window)
if (open_windows is 0) then
OpenURL "http://example.com"
end if
end tell
This is so slightly awkward semantics, because Firefox does not comply to the default AppleScript API, but with this trick only if no window is already open, a new browser window is created.
Activate Mail
tell application "Mail"
activate
if not (exists window 1) then
make new message viewer
end if
end tell
Activate Finder
tell application "Finder"
activate
if not (exists Finder window 1) then
make new Finder window
end if
end tell
iTunes back track/next track/stop
tell application "iTunes" to back track
Exhange "back track" for "next track" and "stop" - duh...
OK, so you're done! You have a fully functional Microsoft Keyboard (I am only spelling M$ correctly here and once so that the Google bots have at least a single chance... have mercy :P) and a nice Logitech MX Revolution set up and working. So, why in the devils - or whatever deity you believe in - name did I not just download and buy a program that can do the same thing for e.g. the mouse with a much simpler preconfigured interface? Very simple:
- You need to buy an app for the keyboard AND for the mouse each.
If you want to tune your joypad or joystick, that's even another investment (ControllerMate can do all those, too!).
These apps usually cost 20-30 $, not just 15 bucks!
You only can set up what the app developer allows you to do, not the freedom of choice you have with ControllerMate.
About the last point: what I really have set up is e.g. for one of the mouse buttons to do the following - so you get a faint idea what ControllerMate lets you do:
- If a single button is pressed and an item is selected, copy it to the clipboard and paste the items string representation to a Growl event.
If no passage was selected, paste the latest Clipboard to the cursor position.
If a double click event was registered, not only paste the item, but also delete it from the clipboard (so I can e.g. first copy 5 items and then sequentially paste them back again!) and send a message to Growl about the removal.
Pretty cool, eh? Yeah, if you still use Vista, just cry - never seen anything like ControllerMate for this junk system *very, very evil grin*. How to do it? I'll let you be creative here *even more evil grin*... Any other questions? This should be pretty self-explanatory, no? Want to say I am not very precise? Huh? *eg, third* No, seriously, please feel free to post!