jkotlinski / durexforth

Modern C64 Forth
Other
230 stars 28 forks source link

`v`: support ctrl-[ #544

Closed ekipan closed 1 year ago

ekipan commented 1 year ago

In PC terminal emulators ctrl-[ sends the same keycode as Esc, $1b, so you can exit vi's insert mode without having to reach up for the escape key. DurexForth's key (and so presumably the C64 routines it uses) gives the same keycode so it could be nice for v to support for VICE users where [ is unshifted. If I understand correctly the relevant source is v.fs line 300.

polluks commented 1 year ago

Indeed, cc65 supports this too https://cc65.github.io/doc/c64.html#ss9.1

jkotlinski commented 1 year ago

If it is a problem of VICE keyboard ergonomics, why not just change the VICE keyboard mapping so that it suits you better? It is eminently configurable.

ekipan commented 1 year ago

It's not any more ergonomic to press Ctrl-[ vs. the default Shift-~ for <-. Just another keystroke to share in common with vi, if you care about that. I'm not too concerned myself, wouldn't bother me if it were closed rejected.

I'd be curious to know how many vi users even know this is possible.

jkotlinski commented 1 year ago

OK.... Well, I do not think there is enough RAM to add even 1% of vi keypresses, so so far, I try to stick to the essentials (at least for me), maybe it is already too much.

I had no idea about Ctrl+[ , I will try to remember that one and use it in everyday life. Thank you for the tip!

ekipan commented 1 year ago

It might rely on an American English keyboard layout? Just FYI.