-
-
Notifications
You must be signed in to change notification settings - Fork 833
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[vtparse] SS3 sequence #4463
Comments
I'm not sure about this; it feels ambiguous and tricky to handle correctly at the vtparse layer. |
I would like a library with minimal dependencies. Would you mind explaining why |
Your use case sounds as though it is higher level than |
In diff --git a/termwiz/src/escape/parser/mod.rs b/termwiz/src/escape/parser/mod.rs
index 22047668d..98e455765 100644
--- a/termwiz/src/escape/parser/mod.rs
+++ b/termwiz/src/escape/parser/mod.rs
@@ -200,10 +200,12 @@ fn is_short_dcs(intermediates: &[u8], byte: u8) -> bool {
impl<'a, F: FnMut(Action)> VTActor for Performer<'a, F> {
fn print(&mut self, c: char) {
+ println!("print({:?})",c);
(self.callback)(Action::Print(c));
}
fn execute_c0_or_c1(&mut self, byte: u8) {
+ println!("execute_c0_or_c1({:?})", byte as char);
match FromPrimitive::from_u8(byte) {
Some(code) => (self.callback)(Action::Control(code)),
None => error!( |
it is used. However, mixing debug prints with other tui stuff can be challenging: the line editor may erase and re-print over the top of that stuff, for example. |
Ok, I've just found the logic here: Lines 1353 to 1356 in d680953
For SS3, the |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
On MacOS, F1 key is reported as ESC-O-P ([27, 79, 80]) sequence.
But
vtparse
reports two events:$ cargo run [esc_dispatch] params=[], intermediates=[], ignored_excess_intermediates=false, byte=4f [print] 'P'
Could
vtparse
be extended to report a single event ?Thanks.
https://en.wikipedia.org/wiki/C0_and_C1_control_codes#C1_control_codes_for_general_use
See alacritty/vte#101
The text was updated successfully, but these errors were encountered: