T10: focus in and out reach a program under mode 1004; the window wears the program's title; a bell is logged and silent; the scrollback setting caps history and trims it live; Cmd-F finds in the scrollback with Ely's FindWidget, matches washed, Enter older, Shift-Enter newer, new output searched again
This commit is contained in:
11 files changed
+486
-35
No files matched your search
+14
-5
@@ -11,21 +11,30 @@ use super::{
|
||||
view::TerminalView,
|
||||
};
|
||||
|
||||
actions!(elyterminal, [Copy, Paste]);
|
||||
actions!(elyterminal, [Copy, Paste, Find, FindNewer]);
|
||||
|
||||
/// The key context a terminal's root sets.
|
||||
pub const CONTEXT: &str = "Terminal";
|
||||
|
||||
/// Copy and paste; Ely's focus keys go to the terminal's listeners instead.
|
||||
/// The key context of a terminal's find box.
|
||||
pub const FIND: &str = "TerminalFind";
|
||||
|
||||
/// Copy, paste and find; Ely's focus keys go to the terminal's listeners instead.
|
||||
pub fn bind_keys(cx: &mut App) {
|
||||
let (copy, paste) = if cfg!(target_os = "macos") {
|
||||
("cmd-c", "cmd-v")
|
||||
let (copy, paste, find) = if cfg!(target_os = "macos") {
|
||||
("cmd-c", "cmd-v", "cmd-f")
|
||||
} else {
|
||||
("ctrl-shift-c", "ctrl-shift-v")
|
||||
("ctrl-shift-c", "ctrl-shift-v", "ctrl-shift-f")
|
||||
};
|
||||
cx.bind_keys([
|
||||
KeyBinding::new(copy, Copy, Some(CONTEXT)),
|
||||
KeyBinding::new(paste, Paste, Some(CONTEXT)),
|
||||
KeyBinding::new(find, Find, Some(CONTEXT)),
|
||||
KeyBinding::new(
|
||||
"shift-enter",
|
||||
FindNewer,
|
||||
Some(&format!("{FIND} > ElyInput")),
|
||||
),
|
||||
]);
|
||||
cx.bind_keys(
|
||||
["tab", "shift-tab", "f6", "shift-f6"]
|
||||
|
||||
Reference in new issue
Block a user