How do I to modify a key?

About BasiliskII, a 68k Mac emulator for Windows, MacOSX, and Linux that can run System 7.x through MacOS 8.1.

Moderators: Cat_7, Ronald P. Regensburg

Post Reply
User avatar
Macinspanish
Space Cadet
Posts: 4
Joined: Mon Mar 11, 2013 6:38 pm
Location: Barcelona, Spain
Contact:

How do I to modify a key?

Post by Macinspanish »

I'm running Basilisk II on fullscreen. The modifier keys of windows and the equivalent with Mac OS are:

Control = Control
Windows key = Option
Alt = Command
------------
Alt Gr = Control + Command

The problem is when I press the "Option" key on Basilisk II, automatically Windows switches to the explorer to show me the start menu.

I would to convert the option key to Alt Gr and leave unusable in Basilisk II the Windows key.

Thanks.
09mai2013
Student Driver
Posts: 10
Joined: Wed May 08, 2013 11:28 pm

Re: How do I to modify a key?

Post by 09mai2013 »

Macinspanish wrote:I'm running Basilisk II on fullscreen. The modifier keys of windows and the equivalent with Mac OS are:

Control = Control
Windows key = Option
Alt = Command
------------
Alt Gr = Control + Command

The problem is when I press the "Option" key on Basilisk II, automatically Windows switches to the explorer to show me the start menu.

I would to convert the option key to Alt Gr and leave unusable in Basilisk II the Windows key.

Thanks.
My solution was to add the following line in the Windows section in the BasiliskII_keycodes file, to make the APPLICATION key the option key.

93 58 ## CONTEXT (-> Option)

such that it looks as:

220 58 # Logo Right (-> Option)
93 58 ## CONTEXT (-> Option)
221 50 # Menu (-> International)

I tried to disable the Windows logo key in the keycodes file in all ways I could think, without any success. (I changed all lines that have 58, no success)

I did not try to convert ALT GR to anything, but it seems to behave as the two keys ALT and CTRL, and not as a separate distinguishable key.

P.
09mai2013
Student Driver
Posts: 10
Joined: Wed May 08, 2013 11:28 pm

Re: How do I to modify a key?

Post by 09mai2013 »

Does someone know the scan code (on the Macintosh side) for the Power key?
User avatar
adespoton
Forum All-Star
Posts: 4226
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: How do I to modify a key?

Post by adespoton »

I've been hunting this for some time, and finally found it:
http://www.scs.stanford.edu/11wi-cs140/ ... des-5.html
5.33 Keyboards with many keys

The current mechanism is unable to handle keyboards with more than 127 keys. But such keyboards seem to exist. Indeed, I now have a Safeway SW23 that has 132 keys.

Mark Hatle <fray@kernel.crashing.org> wrote:

On some ADB keyboards there are actually 128 distinct keys. They use scancodes 0-127.

ADB is Apple Desktop Bus. The way that ADB works is similar to SCSI but on a much slower level. Specifically there is a communications chip in the computer, ADB controller, and the same chip in the keyboard. The keyboard sends the scancode to its internal ADB controller, the internal ADB controller then does any key mapping needed (not used under linux from my understanding) and passes the data to the computer.

The ADB controller is capable of sending 256 distinct keys, but to my knowledge only 128 are sent. The key 0 is the 'a' and key 127 is the "power button".

Also some of the Apple ADB keyboards have special "sound" and "function" keys. These keys (used in MacOS for volume up and down, screen contrast changing, etc) also show up on the ADB scancodes.

ADB is used for both m68k and PPC Linux. The m68k Macintosh port, and the PPC - Power Macintosh and CHRP ports.

and later:

Basically the scancode sequences for ADB are 16 bit. so there can actually be 65536 scancodes, currently though only 128 are defined.
This link might be more useful though:
http://jaoswald.wordpress.com/symbolics ... r-mapping/ -- this may help with more complex keymappings too (I was having issues running Basilisk II for Windows inside a Wineskin wrapper and getting the option key on my Mac keyboard mapping to the Option key in OS 9).

[edit]
Argh... or I might have just read http://www.win.tue.nl/~aeb/linux/kbd/scancodes-10.html as linked from http://www.emaculation.com/forum/viewtopic.php?t=6662

All useful reading though.
Post Reply