Ttibsi / rawterm

C++20 library for building TUI applications
MIT License
5 stars 3 forks source link

Implement page up, page down, home, end keys #23

Open Ttibsi opened 1 year ago

Ttibsi commented 1 year ago

See here: https://viewsourcecode.org/snaptoken/kilo/03.rawInputAndOutput.html#the-page-up-and-page-down-keys

In short, I can't find the accurate code for it -- I'm not sure if the one on that page is correct, as other sources quote other things -- this suggests something else.

Similarly scroll down a bit more to see Home and End on the first link as well.

Note, on a macbook, these are usually the function+arrow keys. I think we just want to do this as it's own Modifier for each key (probably with no char code as that's not relevant there)

Eczbek commented 1 year ago

In my terminal, Page Up has the same code as Numpad 9, Page Down as Numpad 3, Home as Numpad 7, and End as Numpad 1