xmodmap question: how to make Cmd key act like Win key (not Alt key)?
Posted 25 February 2014 - 04:09 AM
Unfortunately, the Cmd key on the Mac keyboard also acts like the Alt key in the application, and I am trying to make the Cmd key on the Mac keyboard send the codes for the Win key to the application instead. The application uses Win+F11 and Win+F12, and I can't make these work.
I'm running the latest Wineskin under OS X 10.9.1. If I try to run the copy of xmodmap inside the Wineskin bundle, it gives this error message:
dyld: Library not loaded: @executable_path/../Frameworks/libX11.6.dylib
Referenced from: /Users/edward/WPDOSBox Files/vDos.app/Contents/Frameworks/bin/xmodmap
Reason: image not found
Trace/BPT trap: 5
I'm afraid I'm a beginner at this, and I'll be grateful for any help in getting an .Xmodmap file that will map the Cmd key on the keyboard to the Win key in the application. Thanks in advance.
Posted 25 February 2014 - 09:56 PM
Hope it helps.
Posted 25 February 2014 - 11:02 PM
After reading a lot of pages, I eventually came up with this: The contents of my .Xmodmap file are as follows:
! keycodes 63 and 71 and left and right command keys ! keycodes 66 and sixty-nine are left and right alt keys keycode 63 = Super_L keycode 71 = Super_R keycode 66 = Alt_L Meta_L keycode <<<SEE NOTE BELOW>>> = Alt_R Meta_R clear mod1 clear mod4 add mod1 = Alt_L Alt_R add mod4 = Super_L Super_R
<<<THIS IS THE "NOTE BELOW">>> Weirdly - when I type in "keycode" and the numerals six and nine, the BBS software replaces the numerals six and nine with the word "number" (I suppose to discourage teen-age boys from posting things they shouldn't), but if you use this code, make sure to use "keycode six nine" with those last two words as numerals; the numerals belong where "<<<SEE NOTE BELOW>>>" appears in the code.
I'm not sure how much of this code is actually needed, but it seems to work.
For those who wonder how to get an .Xmodmap file into a Wineskin, here's one easy way. Create a text file like the one above and name it Xmodmap (no dot) and save it in the Frameworks folder of a Wineskin. Then open a terminal window with the Frameworks folder as the current directory and enter this command
cp Xmodmap .Xmodmap
(note the dot before the second filename) which creates the invisible .Xmodmap file as a copy of the visible Xmodmap file.
To open a terminal window on the Frameworks folder easily, 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.
The program I'm using uses Win+F11 and Win+F12 to specific functions, and these now work correctly with Cmd+F11 and Cmd+F12. What I want to do now is figure out some way to make Cmd+F1, F2, etc. do nothing at all. Right now, they act like F1, F2, etc., which is mildly annoying but not serious.
EDIT: In an earlier version of this post I wasn't certain that both Win keys worked correctly. I now see that they do work correctly.
Posted 05 March 2014 - 03:14 PM
Posted 05 March 2014 - 04:07 PM
Thanks - that clearly makes things easier!
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users