BMOW title
Floppy Emu banner

Custom Key Mappings for ADB-USB Wombat

 

Here’s an exciting new feature for the ADB-USB Wombat input adapter: custom key mappings.
With firmware version 0.3.0 or later, you can replace the built-in mappings between USB and ADB scan codes, and create your own customized key mapping tables. Change which keys behave as Command and Option, reassign the function keys to new purposes, select a different key to behave as ADB power/wake-up, and design other custom key mappings. Go crazy!

The code framework to support custom mappings has been in place for a while, and it’s little more than a lookup table of USB to ADB scan code equivalents, and a complementary table of ADB to USB equivalents. There are two separate tables, instead of a single bidirectional table, because there’s not always a one-to-one mapping between USB and ADB scan codes (in mathematical terms it’s not a bijection). Use a custom lookup table, and you’ll get custom key assignments.

The harder part was designing a user-friendly interface for viewing and editing the tables. It would be awkward and error-prone to expect people to manually fill in a few hundred numbers in a hex editor. After considering various cross-platform frameworks like Qt, I decided to implement the keymap editor as a web page. All of the logic is implemented in Javascript, so you can see how it works by viewing the page source. I’m not the world’s greatest UI designer, so if you’re a web UI specialist and want to contribute some interface improvements, they would be very welcome.

Because the control, shift, and capslock keys are used to access the Wombat’s help commands, those keys shouldn’t be remapped. A few other mapping details are called out in the editor for ISO keyboards and certain ADB keyboards.

Installing the custom key mappings to your Wombat board is very similar to installing new firmware. Copy a file to a USB flash drive, put the flash drive in the Wombat’s USB port, and hold the board’s power key button while it powers on. Complete instructions are on the keymap editor page. If you accidentally mess up the key mappings so badly that you can’t recover, the keymap editor can also be used to download and reinstall the default keymap.

Be the first to comment! 

No comments yet. Be the first.

Leave a reply. For customer support issues, please use the Customer Support link instead of writing comments.