Mac Os Keyboard Mapper
Corrected keyboard mapping for Wine under OS X
If you don't like the way your keyboard is laid out, a keyboard remapper can change it. There are only a few for Mac OS X, and the lack of development on many of your options makes your choice. Incorrect keyboard mapping in OSX 10.7 guest. This seems to be the problem that I am facing, I could not find any solutions on that page. It is marked with the following. This question is Not Answered. What do I need to do to get the keyboard on a guest os x mavericks on a macbook pro host respond to the same keys as the host?
The problem: incorrect mapping of Alt and Win keys in Wine
By default, Windows applications that are run under Wine in OS X use a confusing system of mapping keys on the Mac keyboard to keystrokes sent to the application.
In Wine, by default, in order to send a keystroke such as Alt-F1 to a Windows application, you must type Cmd-F1 on the Mac keyboard. The Option key on the Mac does nothing, and there is no way to send a Win-key keystroke. This problem occurs both with the Mac driver and with the X11 driver supplied with the superb Wineskin wrapper software (and presumably with other Wine implementations).
A solution for the Wine Mac driver
In order to correct the keyboard mapping in the native Mac driver for Wine, you may either use a patched version of one of the files used by the driver, or build a corrected version of the driver from the Wine source code.
The simplest way to fix the problem is to use a patched version of the file winemac.drv.so, which may be downloaded from this link. It is a patched copy of the file as supplied with version 1.8. (And it appears to work correctly under Wine 2.0.)The patch is based on these instructions from Wladimir Palant. Use the OS X Finder to locate the original version of this file on your system (it is deep inside the directory structure of a Wineskin wrapper); make a backup copy of the original, and replace it with the patched version.
Expert users will want to build their own copy of the driver (or of the complete Wine software). To do so, replace the keyboard.c file in the source code with the corrected version which may be downloaded from this link. The four modified lines are the ones that include comments that begin //was
If you know how use the source code, you will not need detailed instructions. You may either build all of Wine or merely the winemac driver. To build the driver only, from the top-level directory of the source code (basic detail only):
A solution for the X11 driver
The same erroneous keyboard mapping occurs with the X11 driver for Wine that is used in Wineskin (and presumably other Wine implementations). The solution for Wineskin wrappers is as follows (I have not experimented with a full, separate Wine installation):
You must create a new .Xmodmap file (note the dot at the start of the name) and write it to the Frameworks folder inside the Contents folder inside your Wineskin. The easiest way to do this is as follows.

First, create a text file named Xmodmap (no dot!) inside the Frameworks folder of your Wineskin; use the following as the contents of the file (the first two lines are comments and may be omitted):
Next, go to System Preferences, Keyboard, Shortcut, and, under Services, Files and Folders, add a checkmark next to New Terminal at Folder. Then, with the Frameworks folder selected in the Finder, ctrl-click and choose New Terminal at Folder from the Services menu.
Inside the Terminal window, enter the following command:
Mac Os Keyboard Mapper Software
Note the dot at the start of the target filename. This creates an invisible '.Xmodmap' file as a copy of the visible file that you created earlier. Let the visible file remain in the folder so that you can easily edit it and recopy it later if needed.
Edward Mendelson (em thirty-six [at] columbia [dot] edu, but with two initials and two numerals before the [at] sign, not spelled out as shown here).
Click here to return to the 'Customizing the OS X keyboard map' hint |
Mac Os Keyboard Mapper Windows 10
Hey, I haven't successfully been able to swap command with option/alt, but to swap Caps Lock and Ctrl on USB mice, you no longer need to rebuild AppleUSBKeyboard.kext, and instead can do the following, taken from From http://ella.slis.indiana.edu/~jfieber/osx/ , look below.
1. Edit /System/Library/Extensions/IOUSBFamily.kext/Contents/PlugIns/AppleUSBKeyboard.kext/Contents/Info.plist and add:
<key>Swap control and capslock</key>
<integer>1</integer>
under IOKitPersonalities/AppleUSBKeyboard. You can, of course, use the PropertyListEditor application that comes with the developer tools to add the property.
2. Remove the file /System/Library/Extensions.mkext. This is a device driver cache. The modified AppleUSBKeyboard driver will not be loaded if this exists. The next reboot will rebuild this file with the modified AppleUSBKeyboard driver. (And the reboot will take a bit longer than normal as it builds the file.)
3. Reboot.
Swiping Option/Command
I tried to use Swipe command option, but it doesn't work. I suspect that I don't have the right names for those keys. Any ideas?
Anthony
anton aaattt jotpuree.com
Mac Pc Keyboard Mapping
The tool KeyRemap4MacBook, http://pqrs.org/macosx/keyremap4macbook/, lets you remap the keyboard in any way you could possibly desire, and several ways I can't imagine ever desiring. It's super useful. (my left shift key was stuck on, making my laptop unusable without an external keyboard, and it let me disable just the left shift key)