Beginning research
This commit is contained in:
parent
efad2a9ccd
commit
2ca340b9f1
3 changed files with 23 additions and 9 deletions
5
crates/terminal/src/keyboard_to_esc.rs
Normal file
5
crates/terminal/src/keyboard_to_esc.rs
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
use gpui::KeyDownEvent;
|
||||||
|
|
||||||
|
fn to_esc_str(event: &KeyDownEvent) -> &str {
|
||||||
|
"Test"
|
||||||
|
}
|
|
@ -1,5 +1,6 @@
|
||||||
pub mod color_translation;
|
mod color_translation;
|
||||||
pub mod connection;
|
pub mod connection;
|
||||||
|
mod keyboard_to_esc;
|
||||||
mod modal;
|
mod modal;
|
||||||
pub mod terminal_element;
|
pub mod terminal_element;
|
||||||
|
|
||||||
|
|
|
@ -360,14 +360,22 @@ impl Element for TerminalEl {
|
||||||
cx.dispatch_action(ScrollTerminal(vertical_scroll.round() as i32));
|
cx.dispatch_action(ScrollTerminal(vertical_scroll.round() as i32));
|
||||||
})
|
})
|
||||||
.is_some(),
|
.is_some(),
|
||||||
Event::KeyDown(KeyDownEvent {
|
Event::KeyDown(
|
||||||
input: Some(input), ..
|
e @ KeyDownEvent {
|
||||||
}) => cx
|
input: Some(input), ..
|
||||||
.is_parent_view_focused()
|
},
|
||||||
.then(|| {
|
) => {
|
||||||
cx.dispatch_action(Input(input.to_string()));
|
dbg!(e);
|
||||||
})
|
cx.is_parent_view_focused()
|
||||||
.is_some(),
|
.then(|| {
|
||||||
|
cx.dispatch_action(Input(input.to_string()));
|
||||||
|
})
|
||||||
|
.is_some()
|
||||||
|
}
|
||||||
|
Event::KeyDown(e) => {
|
||||||
|
dbg!(e);
|
||||||
|
false
|
||||||
|
}
|
||||||
_ => false,
|
_ => false,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue