Hi Folks,
Just a few comments on this thread FWIW.
The Yellow MSX keyboard is very nice and is based on the Omega keyboard. I think the Yellow MSX keyboard design is very close to the Omega. The main difference is really in the RCBus interface board that allows it to be on the RCBus.
The MSX keyboard driver in RomWBW does indeed emulate scan codes under the covers. I'm actually not entirely sure why Dean did it that way. RomWBW itself does not know about or care about scan codes. The PS2 keyboard driver does handle scan codes because it must. I suspect that Dean was emulating the PS2 driver.
RomWBW deals with keyboards basically as a byte stream. The bytes are normally just the ASCII equivalents. There are supplemental bits that indicate the state of the shift/ctrl/etc. keys. As already pointed out, values 0xE0-0xFF are assigned to a generic set of keys like functions keys, arrow keys, etc.
If you implement a new keyboard and driver, I strongly recommend having the driver conform to the established keyboard byte stream. Then, as you wish to create key mappings, considering implementing a new terminal emulation module. You could take the existing ANSI/VT100 module and enhance it or create your own. Doing it this way will allow any keyboard to be used with the key mappings you want.
One more thing to keep in mind about keyboards. The MSX and similar keyboards use matrix scanning. There is substantial overhead to this. The PS2 keyboard interface is "intelligent" and has very low overhead, buffers incoming keys on its own, and needs no interrupts.
Thanks, Wayne