It wouldn't make sense to add Recreated support to a ZX Next, but it does make sense to add it to the ZX81, which has a very similar layout. So here it is. It also adds ghosting support.
There are a few changes to the normal keyboard, but they are minor and backward compatible. The only incompatible change is that the numeric keypad works as numbers instead of cursor movement, but the normal cursor keys still work as usual. There's a new option to not press Shift when pressing the normal cursor keys (e.g. for games that are controlled with 5,6,7,8). For compatibility with the official core, these keys are shifted by default.
With this change:
- Both single and double quotes produce double quotes. Previously, you had to press single quote to get double, and pressing double did nothing.
- Shift+Comma produces less-than. Note that Shift+Period produces a comma, because the period is the raw ZX81 key and in a real ZX81 it produces a comma.
- The keys in the numeric keypad all work, except for Num Lock which does this weird MiSTer function that I don't understand.
- Tab is equivalent to Shift Enter (Function mode).
- Caps Lock is equivalent to Shift 9 (Graph mode).
- Key 102 in some European keyboards (the one between left shift and Z, if present) produces < and >.
I've also revamped the keyboard handling. It no longer happens that the shift key gets released while you hold it when pressing other keys. For example, in the official core, this combination does not work as expected: press and hold SHIFT, press ":", release ":", press "B". Since SHIFT is still pressed, pressing "B" should produce an asterisk, but we get a B. With this core that's fixed and you get an asterisk, as expected. This or similar problems are common in most cores; it's rare to see a core that gets this right.
In Recreated mode, the normal keyboard keys that aren't incompatible with the Recreated keyboard still work, e.g. the keypad and cursor keys, if you have both keyboards connected at the same time.
Finally, I've created a keyboard test program (also attached) in machine code, to check the keys.