Ubuntu Xmodmap and Reconfiguring Keys in SS

About SheepShaver, a PPC Mac emulator for Windows, MacOS X, and Linux that can run System 7.5.3 to MacOS 9.0.4.

Moderators: Cat_7, Ronald P. Regensburg, ClockWise

Post Reply
J. Gryphon
Student Driver
Posts: 19
Joined: Mon Jun 16, 2014 12:52 pm

Ubuntu Xmodmap and Reconfiguring Keys in SS

Post by J. Gryphon »

In Ubuntu 18.10, I have the ctrl and command ("super") keys switched up to roughly simulate the standard Mac setup. That works fine for Ubuntu, but in SheepShaver, the modifier keys are all jumbled up -- the option/alt key on my keyboard triggers command, the ctrl key triggers option, and the command key triggers control. It does this regardless of how I switch them around in the keycode file. I know it's loading the keycodes because almost every other reconfig works fine (although for some reason it chooses to replace the ` key with the §, even though the grave accent works fine in Ubuntu and seems to be configured properly). What gives? I suspect it has something to do with SDL and xmodmap, but I'm not sure where the trouble would be.

If there's a Classic Mac OS extension that remaps keys I'd be happy to just use that to remap the keys back to how they ought to work, instead of fiddling with keycodes, but from my quick search over popular extensions, I couldn't find one -- Google doesn't help much in that regard (with the preponderance of OS X it's very hard to search for Classic Mac-only resources online these days). The most useful thing I found had to do with remapping Windows keys via ResEdit, but it only covers two keys, when I need to change all three.
J. Gryphon
Student Driver
Posts: 19
Joined: Mon Jun 16, 2014 12:52 pm

Re: Ubuntu Xmodmap and Reconfiguring Keys in SS

Post by J. Gryphon »

I looked around at length and eventually found that the keys seem to be hard-coded in the video_sdl2.cpp file, when making a SDL2 Linux build. It took a while but I tweaked them until they started to produce the proper results. The process will probably vary depending on the details of your system, but it basically involves looking at the codes for SDLK-LCTRL & friends and switching them around until SheepShaver produces what you're looking for, then building the application with the modified file.
Post Reply