Add keyboard tab switching

This commit is contained in:
2026-05-07 19:10:04 -04:00
parent c6ddf806d1
commit de68fb6ac3
3 changed files with 104 additions and 2 deletions
+8 -1
View File
@@ -6,7 +6,10 @@ use gpui::{
};
use shell::ElyShell;
actions!(ely_app, [CloseCurrentTab, FocusAddressBar, OpenNewTab, Quit]);
actions!(
ely_app,
[CloseCurrentTab, FocusAddressBar, OpenNewTab, Quit, SelectNextTab, SelectPreviousTab,]
);
fn main() {
Application::new().run(|cx: &mut App| {
@@ -19,6 +22,10 @@ fn main() {
KeyBinding::new("ctrl-l", FocusAddressBar, None),
KeyBinding::new("cmd-w", CloseCurrentTab, None),
KeyBinding::new("ctrl-w", CloseCurrentTab, None),
KeyBinding::new("cmd-shift-]", SelectNextTab, None),
KeyBinding::new("ctrl-tab", SelectNextTab, None),
KeyBinding::new("cmd-shift-[", SelectPreviousTab, None),
KeyBinding::new("ctrl-shift-tab", SelectPreviousTab, None),
KeyBinding::new("cmd-q", Quit, None),
]);
cx.set_menus(vec![