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):

./configure --without-x --without-png --without-freetype make dlls/winemac.drv/Makefile cd dlls/winemac.drv make

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.

Mac Os Keyboard Mapper

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):

! keycodes 63 and 71 are left and right command keys ! keycodes 66 and 69 are left and right alt keys keycode 63 = Super_L keycode 71 = Super_R keycode 66 = Alt_L Meta_L keycode 69 = Alt_R Meta_R clear mod1 clear mod4 add mod1 = Alt_L Alt_R add mod4 = Super_L Super_R

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).


Customizing the OS X keyboard map 6 comments Create New Account
Click here to return to the 'Customizing the OS X keyboard map' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
As a French person working with an American keyboard, I needed a way to have an easy access to accentuated characters. ResEdit makes it very easy to customize one's own keyboard configuration, but MacOS X needs a little more work to be done. Here's a tip I found on http://www.omnigroup.com/mailman/archive/macosx-dev/2000-November/006433.html : 1/ copy a valid font in the (home)/Library/Fonts folder 2/ with Resedit, create a file named myKCHR.rsrc with the customized KCHR and a copy of the adequate itlb (name the KCHR since this is the name that will eventually appear in the International Preference Panel). Put myKCHR.rsrc in your Home directory. 3/ open terminal and type su + password 4/ type /Developer/Tools/DeRez myKCHR.rsrc > /tmp/myKCHR.r 5/ type /Developer/Tools/Rez -useDF -a -o /System/Library/Frameworks/Carbon.framework/Frameworks/HIToolbox.framework/Resources/HIToolbox.rsrc /tmp/myKCHR.r 6/ log out, log in and select the new layout in the International Panel of the System Preferences
I recently bought a cheap USB keyboard to replace my OEM dinky keyboard. It's nice having a forward delete key again, but the Command and Option keys are reversed ('cause the keyboard is made for Windows PCs). So I've worked out how to swap the keys in OS10.1. The hack affects the entire system, including Classic. You'll need to install the Developer Tools and sign up with ADC at www.apple.com/developer. So here goes... Download the IOUSBFamily source files: href='http://www.opensource.apple.com/projects/darwin/1.4/source/apsl/IOUSBFamily-1.8.4GMc3.tar.gz'>http://www.opensource.apple.com/projects/darwin/1.4/source/apsl/IOUSBFamily-1.8.4GMc3.tar.gz Save the archive in a folder of your choice. Launch Terminal, navigate to the folder you saved the .tar.gz file in and execute the following command: gnutar -xvfz IOUSBFamily-1.8.4GMc3.tar.gz This will create a folder called 'IOUSBFamily-1.8.4GMc3.tar.gz'. If you get a message about the SCM status operation failing, just click the Disable button (at least, that's what I did; feel free to correct me). Inside the folder is a project file and a bunch of folders filled with libraries. Source code!! Double click on the file called 'IOUSBFamily.pbproj' and it will open in Project Builder. Click on the drop down arrow for 'AppleUSBKeyboard' and then 'Classes'. Highlight the item called 'cosmo_USB2ADB.cpp'. On the right will appear the code for this resource. Scroll down past the header comments and you'll see a list of codes. Each one represents a key. Fortunately for us the ones we're looking for were commented by a considerate programmer. To switch the Command and Option keys, simply swap their position in the list. Thus: 0x3a, // e2 Left option/alt key 0x37, // e3 Left command key Becomes: 0x37, // e3 Left command key 0x3a, // e2 Left option/alt key Do the same for the right hand keys, and then select File -> Save. Now just select Build -> Build from the menu bar. When it's finished there will be a new directory in the 'IOUSBFamily-1.8.4GMc3.tar.gz' folder called 'build'. Inside it are the compiled binaries that you just created from your modified source code. Go back to the Terminal, navigate to the build directory, and then enter the following commands, along with your root password when asked for it: sudo -s cp -R AppleUSBKeyboard.kext /System/Library/Extensions That's it! Just restart your computer and the keys are switched. If your system goes haywire boot to single user mode or perform sudo, then navigate to the /System/Library/Extensions folder and rm -R AppleUSBKeyboard.kext to get yourself back to normal. I'm considering posting the binary on my mac.com account, if someone can reassure me that doing so won't violate the Apple Public Source License. -Morgan morganize_it@mac.com System: G4/350 AGP OSX 10.1 Build: 5L14 Keyboard: Yahoo! USB Hub Internet Keyboard (Sakar Int'l Inc. model# 9001AH)

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

I received an email from 'Ricky M.' who has put together a set of instructions for keyboard modifications; you can read them here: http://homepage.mac.com/pukku/osx_kchrs.html
For those of you looking to remap your caps lock key to the control key, I've developed just the hack for you. Take a look at the iControl website for binaries and sources that I put together.

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)