Closed mist64 closed 2 years ago
The Windows' "MENU" key could be HELP?
The MENU key is quite prominent and easy to hit by mistake. But that's true on Windows as well. I never really understood the point of this key on PCs...
Accessibility, given that there's no easy way to invoke context menus without a mouse.
Compact and notebook keyboards often do not have a dedicated Pause/Break key. https://en.wikipedia.org/wiki/Break_key#Keyboards_without_Break_key
I think there should be an alternative way to hit Pause/Break if it doesn't exist. My compact keyboard (the official Raspberry Pi Keyboard with UK layout) has ScrLk, SysRq, Home, End, PgUp, PgDn, F11, F12, and Insert reachable via the Fn key. These keys are missing: Pause, Super R (Right Windows key), Menu, Enter (on the num pad). Shift+F10 is an alternative to Menu, but doesn't send the Menu scan code.
I have a Lenovo laptop with no Pause/Break key, but this is mapped to Fn+P/B. That said, I do agree. Perhaps an option to use the right Ctrl key?
Fn+P givs me num pad -. Fn+B just gives me b. I tested using xev
. I use the official Raspberry Pi Keyboard with UK layout.
Question: I guess most of those keys are useful for basic. So what about their use with a ASM program ? In other words, could those special keys have an address handler, used by basic by default, but you can overridde when running as ASM program to avoid any side effects ? Sorry if my question doesn't make any sense :)
@kktos When querying the keyboard using jsr GETIN ($FFE4), you'll get the raw key codes without triggering any side effects. All keys on the standard PS/2 keyboard are planned to generate some PETSCII control code that you can intercept.
The X16 Team has made the following decision about mapping standard PS/2 keys:
PrtScrn
becomes RESTORE
. The X16 can't have the keyboard generate an NMI when this is pressed, but as long as the keyboard driver is still running, it will intercept this and go through the NMI codepath of the KERNAL. This will not generate a PETSCII control code.Scroll Lock
becomes 40/80 DISPLAY
. The key has state, which will be indicated by its LED. Depending on the new state, it will generate a control code for "40 DISPLAY" or for "80 DISPLAY".Pause/Break
becomes RUN/STOP
. This is PETSCII control code $03.Delete
becomes DELETE
, a new forward-delete key. The PETSCII code is TBD.End
becomes END
, a new key that is the opposite of HOME
. The PETSCII code is TBD.Page Up
and Page Down
become PAGE UP
and PAGE DN
, new keys. The PETSCII codes are TBD.Menu
becomes MENU
, a new key. The PETSCII code is TBD.We decided against having a dedicated NO SCROLL
key, because the Alt key (C64: Commodore key) already serves this purpose, and with faster machines, it's a less and less useful feature anyway (if the machine prints text too fast for you to reach the NO SCROLL
key, it's not useful). Most of the other PS/2 keys keps their meaning, so X16 text processors can be more similar to modern computers.
How does the 40/80 switch work, if in 22 (VIC-20) screen mode?
Also, would it not make more sense to make PAUSE/BREAK use the NMI? It would after-all allow the user to interrupt any long-running code; i.e. for debugging. The name is already there, as it breaks into operation. The BASIC could allow you to pause the running program at any time.
Should CAPS LOCK
work as SHIFT LOCK
or as CAPS LOCK
on modern keyboards according to their layout? I think it would be better if it worked as on modern keyboards and e.g. if SV-SE layout CAPS LOCK
would affect ÅÄÖ keys, but not the number keys, but maybe on some layouts CAPS LOCK
works as a SHIFT LOCK
and affects the number keys.
Maybe RESTORE
could generate an NMI if the PS/2 port is connected to VERA and VERA listens for the PrtScn
scan code and then generates an NMI to the WDC65C02.
The names are different on the X16 keyboard so e.g. PrtScn
key will have RESTORE
printed on it.
I'm not sure X16 has a VIC20 screen mode, but if it has it would be great, and how it would work with the 40/80 key TBD. Maybe pressing 40/80 key in 22 mode would go to 40 if unshifted and 80 if shifted.
There hasn't been update on this for more than 5 months and many of the Commander X16 keys are still not mapped. We now even have official X16 keyboard that has many "dead" keys when used with Emulator. Any plan to get this cleaned up?
These are the new codes for the currently unsupported PS/2 keys:
Key | Code | Comment | Shifted Code | Comment |
---|---|---|---|---|
Page Down | $02 | C128: underline | (same) | |
Page Up | $82 | C128: underline off | (same) | |
End | $04 | $84 | C128: HELP | |
Menu | $06 | (same) | ||
Fwd Del | $19 | (same) |
Comments:
The following keys don't produce PETSCII codes:
This key is "40/80 DISPLAY" on the X16. It is a toggle key, like on the C128, and has an LED, so it is treated like CAPS LOCK: It does not produce a PETSCII code, but an application can read its state using kbdbuf_get_modifiers
(bit 5).
This key is "RESTORE" on the X16. The microcontroller that manages the PS/2 bus will raise an NMI on key down.
The following keys are dead right now and need to be added:
Created https://github.com/commanderx16/x16-rom/issues/292 for "40/80 DISPLAY".
We have already mapped lots of the PS/2 keys to their equivalents in PETSCII codes (Break = RUN/STOP, Home = HOME etc.) and added a few control codes from the C128 and the C65 (ESC, TAB, F9-F12).
But there are some more keys on a PS/2 keyboard that don't have a direct PETSCII control code equivalent for yet:
It would be best to map them to keys found on other Commodore 8 bit computers, if it makes sense.
The C128 has the following extra keys (compared to the C64):
The C65 has the following extra keys:
The overlap of these two (that is, the more important, more canonical keys):
->