Beginning research
This commit is contained in:
@@ -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,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user