Kitty: Full keyboard mode "\e[?2017h" and printable keys

Created on 20 Nov 2019  路  6Comments  路  Source: kovidgoyal/kitty

Is there currently way to switch kitty into full keyboard mode like "\e[?2017h" allowing application to receive "\e_K(...)\e\" input for printable keys (123ABCabc...) as well?
If currently there is no such way, is there a chance to add such mode to kitty?
I'd be very interested in receiving both: normal characters and escaped keys codes in parallel but having keys input only would be just fine.

EDIT: even having only printable key releases somehow would work for me

I develop terminal games, and I would love to be finally able to keep track on multiple keys pressed at once. With kitty I can almost do it but for non printable keys only.

Most helpful comment

Yeah both keyboard and mouse terminal protocols are very, very poorly
designed. Sadly the terminal ecosystem is extremely slow moving so
getting anything new to happen is way too much uphill struggle.

Still, I plan on adding an improved mouse protocol for my diff kitten
at that time will keep in mind your use case. It would help if you
opened a separate bug report outlining your needs, I can refer to it
when designing the protocol.

As for terminal-wg, as far as I know it's totally dead in the water. I
unsubscribed from it a while back as it was just a bunch of time-wasting
bikeshedding by people that did not want to do any real work.

All 6 comments

No, I'm afraid not. This protocol deliberately does not do that so the user can type reset and recover the terminal. But I am willing to consider adding an additional mode for gaming, it was on my todo list anyway. Maybe with a keep-alive sequence so the terminal auto-resets to printed output. So in this mode if kitty receives the keep alive escape sequence, it will send printable keys as escape sequences with release events for N seconds, where N can be set in the keep alive sequence with a maximum of say 5.

I dont know how well this will work with gaming event loops, dont have any eperience with termial gaming.

Oh and in addition to the atomic screen update escape code kitty already supports this should make it very nice for gaming.

I've posted identical concept on https://gitlab.freedesktop.org/terminal-wg/specifications/issues/1
But that thread is in some stagnation I suppose :(
Anyway thanks for responding to my 'wish' issue, if there's anything you'd like to know about game needs, I'd be happy to help.
Just one more thing, mouse reports using x10, normal, button are all IMO broken (no way to reliably say which button is being released in case if multiple buttons were down previously). That would be nice to incorporate new mouse tracking (with extended coords range and focus tracking in same style report) to the game mode too.

Yeah both keyboard and mouse terminal protocols are very, very poorly
designed. Sadly the terminal ecosystem is extremely slow moving so
getting anything new to happen is way too much uphill struggle.

Still, I plan on adding an improved mouse protocol for my diff kitten
at that time will keep in mind your use case. It would help if you
opened a separate bug report outlining your needs, I can refer to it
when designing the protocol.

As for terminal-wg, as far as I know it's totally dead in the water. I
unsubscribed from it a while back as it was just a bunch of time-wasting
bikeshedding by people that did not want to do any real work.

Closing it, new issue created.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mihaicristiantanase picture mihaicristiantanase  路  3Comments

hujianxin picture hujianxin  路  3Comments

keyofnight picture keyofnight  路  3Comments

lazarcf picture lazarcf  路  4Comments

Jomik picture Jomik  路  4Comments