Skip to content

Conversation

@rharke
Copy link

@rharke rharke commented Jan 18, 2026

This adds keyboard remapping support.

The actual reason I am implementing this is because the Apple IIGS uses the "power" key on an ADB keyboard as a "reset" key, and the reset key is extremely important in Apple II land. Actually I would argue that it IS a reset key, not a power key, because the IIGS is the first machine with ADB. In any case, virtually no PC keyboards have a power/reset key, because why would they? There is a key scan code for it, so it seems like a reasonable thing for a user to just remap some other key to be the power key. (Note that currently this doesn't work, because the ADB card firmware handles the power key incorrectly, but we'll get there, baby steps 😉)

I imagine this could be useful for other things too, like if you want to play an old shooter that uses arrow keys, and you are used to WASD.

The actual remappings are loaded from JSON files with basically the same format as gamepad remappings except that you specify protocol_list_keyboard for device_type and set protocol_board and protocol_name accordingly. Here's an example:

{
  "device_type": "protocol_list_keyboard",
  "display_name": "ADB F16->PWR",
  "mapping": {"KEY_F16": {"code": "KEY_POWER"}},
  "protocol_board": "Lisa/Mac/ADB",
  "protocol_name": "ADB_KB"
}

There will be a corresponding PR opened for the configurator to allow you to easily generate this JSON files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant