Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Arrow-key constants #126

Open
venomix666 opened this issue Mar 6, 2024 · 2 comments
Open

Arrow-key constants #126

venomix666 opened this issue Mar 6, 2024 · 2 comments

Comments

@venomix666
Copy link
Contributor

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?

@davidgiven
Copy link
Owner

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.

@venomix666
Copy link
Contributor Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants