Add F11 support
This commit is contained in:
parent
cf9c0c51ae
commit
a90e55f1f0
2 changed files with 9 additions and 0 deletions
|
|
@ -34,6 +34,7 @@ pub fn key_binds() -> HashMap<KeyBind, Action> {
|
||||||
bind!([Shift], Key::Named(Named::Insert), PastePrimary);
|
bind!([Shift], Key::Named(Named::Insert), PastePrimary);
|
||||||
bind!([Ctrl, Shift], Key::Character("W".into()), TabClose);
|
bind!([Ctrl, Shift], Key::Character("W".into()), TabClose);
|
||||||
bind!([Ctrl], Key::Character(",".into()), Settings);
|
bind!([Ctrl], Key::Character(",".into()), Settings);
|
||||||
|
bind!([], Key::Named(Named::F11), ToggleFullscreen);
|
||||||
|
|
||||||
// Ctrl+Alt+D splits horizontally, Ctrl+Alt+R splits vertically, Ctrl+Shift+X maximizes split
|
// Ctrl+Alt+D splits horizontally, Ctrl+Alt+R splits vertically, Ctrl+Shift+X maximizes split
|
||||||
//TODO: Adjust bindings as desired by UX
|
//TODO: Adjust bindings as desired by UX
|
||||||
|
|
|
||||||
|
|
@ -258,6 +258,7 @@ pub enum Action {
|
||||||
TabNewNoProfile,
|
TabNewNoProfile,
|
||||||
TabNext,
|
TabNext,
|
||||||
TabPrev,
|
TabPrev,
|
||||||
|
ToggleFullscreen,
|
||||||
WindowClose,
|
WindowClose,
|
||||||
WindowNew,
|
WindowNew,
|
||||||
ZoomIn,
|
ZoomIn,
|
||||||
|
|
@ -305,6 +306,7 @@ impl Action {
|
||||||
Self::TabNewNoProfile => Message::TabNewNoProfile,
|
Self::TabNewNoProfile => Message::TabNewNoProfile,
|
||||||
Self::TabNext => Message::TabNext,
|
Self::TabNext => Message::TabNext,
|
||||||
Self::TabPrev => Message::TabPrev,
|
Self::TabPrev => Message::TabPrev,
|
||||||
|
Self::ToggleFullscreen => Message::ToggleFullscreen,
|
||||||
Self::WindowClose => Message::WindowClose,
|
Self::WindowClose => Message::WindowClose,
|
||||||
Self::WindowNew => Message::WindowNew,
|
Self::WindowNew => Message::WindowNew,
|
||||||
Self::ZoomIn => Message::ZoomIn,
|
Self::ZoomIn => Message::ZoomIn,
|
||||||
|
|
@ -398,6 +400,7 @@ pub enum Message {
|
||||||
TabPrev,
|
TabPrev,
|
||||||
TermEvent(pane_grid::Pane, segmented_button::Entity, TermEvent),
|
TermEvent(pane_grid::Pane, segmented_button::Entity, TermEvent),
|
||||||
TermEventTx(mpsc::UnboundedSender<(pane_grid::Pane, segmented_button::Entity, TermEvent)>),
|
TermEventTx(mpsc::UnboundedSender<(pane_grid::Pane, segmented_button::Entity, TermEvent)>),
|
||||||
|
ToggleFullscreen,
|
||||||
ToggleContextPage(ContextPage),
|
ToggleContextPage(ContextPage),
|
||||||
UpdateDefaultProfile((bool, ProfileId)),
|
UpdateDefaultProfile((bool, ProfileId)),
|
||||||
UseBrightBold(bool),
|
UseBrightBold(bool),
|
||||||
|
|
@ -1892,6 +1895,11 @@ impl Application for App {
|
||||||
}
|
}
|
||||||
return self.update_focus();
|
return self.update_focus();
|
||||||
}
|
}
|
||||||
|
Message::ToggleFullscreen => {
|
||||||
|
if let Some(window_id) = self.core.main_window_id() {
|
||||||
|
return cosmic::command::toggle_maximize(window_id);
|
||||||
|
}
|
||||||
|
}
|
||||||
Message::CopyPrimary(entity_opt) => {
|
Message::CopyPrimary(entity_opt) => {
|
||||||
if let Some(tab_model) = self.pane_model.active() {
|
if let Some(tab_model) = self.pane_model.active() {
|
||||||
let entity = entity_opt.unwrap_or_else(|| tab_model.active());
|
let entity = entity_opt.unwrap_or_else(|| tab_model.active());
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue