You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
The new keyboard enhancement feature is supported by a small (if growing) subset of terminals. It would be nice to know if the current terminal supports the protocol. This allows adjusting expected keyboard inputs, changing shortcuts, etc.
Describe the solution you'd like
The suggested way to check for support is to:
send a query escape sequence for the current keyboard enhancement status
send a query for the primary device attributes
check if we got two answers, or just one
I'm not immediately sure a) how to reliably do this and b) how we could provide a helper in crossterm itself. Desired workflow would just be something like:
if crossterm::event::detect_keyboard_enhancement_support(&mut stdout)? {
...
Describe alternatives you've considered if any
I don't think there's any other way to detect support. Enabling keyboard enhancement then checking the form of incoming events is possible, but that seems messy and unreliable.
The text was updated successfully, but these errors were encountered:
Would be nice to have this support. I also am not aware with how reliable this is, but we can expose the function at least and have users be able to call it. At least not directly depending crossterm on this logic.
Is your feature request related to a problem? Please describe.
The new keyboard enhancement feature is supported by a small (if growing) subset of terminals. It would be nice to know if the current terminal supports the protocol. This allows adjusting expected keyboard inputs, changing shortcuts, etc.
Describe the solution you'd like
The suggested way to check for support is to:
I'm not immediately sure a) how to reliably do this and b) how we could provide a helper in crossterm itself. Desired workflow would just be something like:
Describe alternatives you've considered if any
I don't think there's any other way to detect support. Enabling keyboard enhancement then checking the form of incoming events is possible, but that seems messy and unreliable.
The text was updated successfully, but these errors were encountered: