Fix space if it uses Named
This commit is contained in:
parent
5c28c15924
commit
1c82463dfb
1 changed files with 8 additions and 3 deletions
|
|
@ -655,6 +655,12 @@ where
|
||||||
//Let CharacterRecieved event handle Ctrl keys if possible
|
//Let CharacterRecieved event handle Ctrl keys if possible
|
||||||
let alt_prefix = if modifiers.alt() { "\x1B" } else { "" };
|
let alt_prefix = if modifiers.alt() { "\x1B" } else { "" };
|
||||||
match named {
|
match named {
|
||||||
|
Named::Backspace if !modifiers.control() => {
|
||||||
|
let code = "\x7f";
|
||||||
|
terminal
|
||||||
|
.input_scroll(format!("{}{}", alt_prefix, code).as_bytes().to_vec());
|
||||||
|
status = Status::Captured;
|
||||||
|
}
|
||||||
Named::Enter if !modifiers.control() => {
|
Named::Enter if !modifiers.control() => {
|
||||||
terminal
|
terminal
|
||||||
.input_scroll(format!("{}{}", alt_prefix, "\x0D").as_bytes().to_vec());
|
.input_scroll(format!("{}{}", alt_prefix, "\x0D").as_bytes().to_vec());
|
||||||
|
|
@ -675,10 +681,9 @@ where
|
||||||
}
|
}
|
||||||
status = Status::Captured;
|
status = Status::Captured;
|
||||||
}
|
}
|
||||||
Named::Backspace if !modifiers.control() => {
|
Named::Space if !modifiers.control() => {
|
||||||
let code = "\x7f";
|
|
||||||
terminal
|
terminal
|
||||||
.input_scroll(format!("{}{}", alt_prefix, code).as_bytes().to_vec());
|
.input_scroll(format!("{}{}", alt_prefix, " ").as_bytes().to_vec());
|
||||||
status = Status::Captured;
|
status = Status::Captured;
|
||||||
}
|
}
|
||||||
Named::Tab => {
|
Named::Tab => {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue