cpm65 icon indicating copy to clipboard operation
cpm65 copied to clipboard

Arrow-key constants

Open venomix666 opened this issue 1 year ago • 3 comments

You mentioned previously somewhere (in a pull request comment I think) that you intended to define constants for the arrow keys. What do you think about using the ASCII-codes for the ctrl-combinations that *nix has used since forever?

Up ctrl+p [0x10] Down ctrl+n [0x0E] Left ctrl+b [0x02] Right ctrl+f [0x06]

Would the best place to add these on the application side be to drivers.inc/screen.h or do you see any use for the arrow keys in tty applications?

venomix666 avatar Mar 06 '24 07:03 venomix666

Those will conflict with control keys --- I ran into this on the ADM3a, which uses ^H, ^J, ^K, ^L and it's actually really annoying that you can't use this keys for anything else. Consider WordStar which uses ^K a lot.

High-bit-set codes are more appropriate here IMO because in the largely 7-bit world of CP/M we know these can't overlap with either printable or control characters. I was vaguely thinking of using the BBC Micro ones, $88/$89/$8a/$8b for this.

davidgiven avatar Mar 06 '24 10:03 davidgiven

I thought of conflicting with control keys as a good thing, as you can fake the arrow keys if you are using a computer or terminal without them, but I see your point of conflicting with other uses for these key combinations as there are no standard expected functions in most cases (as there are on most unix-like systems).

I agree that using high-bit-set codes is a cleaner way to implement this, letting the bios code handle any odd cases when needed.

venomix666 avatar Mar 06 '24 16:03 venomix666