GideonZ / 1541ultimate

Official GIT archive of 1541 ultimate II sources
GNU General Public License v3.0
178 stars 45 forks source link

USB keyboard hotkeys #312

Open barcoboy opened 1 year ago

barcoboy commented 1 year ago

I recently found out that if the F10 or Scroll Lock keys on a USB keyboard plugged into the UII+ are pressed, the menu is displayed as if the Menu cartridge button was pressed. Just wondering if it would be possible to define keys to trigger the other two cartridge buttons, namely Freeze and Reset? This would be useful for C128D users so that they wouldn't have to reach around the back of the computer to use the cart buttons.

I also saw that once in the menus, the USB keyboard could be used for navigation. Another nice feature to go along with this would be to be able to re-define these USB function keys. This would allow the use of a small numeric keypad to be used to control the UII+ menus, such as the following:

https://www.amazon.ca/gp/product/B07NVJ964T

For example, the keypad keys could be configured as follows:

"Num Lock" for Freeze "forward slash" for Menu "asterisk" to Reset "8", "4", "6", "2" cursor keys to navigate (currently working with non-keypad keyboard keys) "plus" and "minus" to change values (currently working) "Enter" to select (currently working) "period/Del" for Back (currently working) "0/Ins" for F2 setup menu "9/PgUp" and "3/PgDn" mapped to F1 and F7 (also currently working with non-keypad keyboard keys) "0" for F5 context menu etc...