mirror of
https://github.com/wez/wezterm.git
synced 2024-12-29 00:21:57 +03:00
add basic tab related key bindings
This commit is contained in:
parent
eb7153eb50
commit
816925424a
@ -26,6 +26,12 @@ pub trait TerminalHost {
|
||||
/// Create a new tab in the current window
|
||||
fn new_tab(&mut self) {}
|
||||
|
||||
/// Switch to a specific tab
|
||||
fn activate_tab(&mut self, _tab: usize) {}
|
||||
|
||||
/// Activate a relative tab number
|
||||
fn activate_tab_relative(&mut self, _delta: isize) {}
|
||||
|
||||
/// Toggle full-screen mode
|
||||
fn toggle_full_screen(&mut self) {}
|
||||
}
|
||||
|
@ -620,6 +620,14 @@ impl TerminalState {
|
||||
host.new_tab();
|
||||
return Ok(());
|
||||
}
|
||||
if mods == (KeyModifiers::SUPER | KeyModifiers::SHIFT) && key == KeyCode::Char('[') {
|
||||
host.activate_tab_relative(-1);
|
||||
return Ok(());
|
||||
}
|
||||
if mods == (KeyModifiers::SUPER | KeyModifiers::SHIFT) && key == KeyCode::Char(']') {
|
||||
host.activate_tab_relative(1);
|
||||
return Ok(());
|
||||
}
|
||||
|
||||
let to_send = match (key, ctrl, alt, shift, self.application_cursor_keys) {
|
||||
(Char('\n'), _, ALT, ..) => {
|
||||
|
Loading…
Reference in New Issue
Block a user