crossterm-rs / crossterm

Cross platform terminal library rust
MIT License
3.29k stars 280 forks source link

Support win32-input-mode #867

Open unxed opened 8 months ago

unxed commented 8 months ago

Unfortunately, Windows Terminal do not support kitty extended input mode. But it supports is own extended input protocol, so called win32-input-mode. It would be great if crossterm supports it too.

win32-input-mode is also supported in excellent far2l which will present in Ubuntu LTS from April, 25th.

PNDTG commented 3 weeks ago

Has this been added? I'm came across this after trying to figure out the continuous Press/Release cycle when holding down a key. The event::KeyEventKind::Repeat just simply doesn't do anything in windows?

How am I supposed to detect multiple keypresses?

unxed commented 3 weeks ago

Repeat count is always 1 as far as I had seen

PNDTG commented 3 weeks ago

What do you mean by Repeat count? For me it's as follows when I hold a key:

image

unxed commented 3 weeks ago

It's about this:

The event::KeyEventKind::Repeat just simply doesn't do anything in windows?

Repeat field (last field in protocol esc sequence) is always 1 as far as I can see.