Skip to content

Commit

Permalink
Add keybindings
Browse files Browse the repository at this point in the history
  • Loading branch information
ahoneybun committed May 20, 2024
1 parent 38cf68b commit 147e0ee
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,10 @@ impl Application for App {
}
}
}
Message::DialogUpdate(dialog_page) => {
//TODO: panicless way to do this?
self.dialog_pages[0] = dialog_page;
}
Message::WindowClose => {
return window::close(window::Id::MAIN);
}
Expand Down Expand Up @@ -372,6 +376,8 @@ pub fn key_binds() -> HashMap<KeyBind, Action> {
}};
}

bind!([Ctrl], Key::Character("r".into()), NewRepo);
bind!([Ctrl, Shift], Key::Character("r".into()), NewSnap);
bind!([Ctrl], Key::Character("w".into()), WindowClose);
bind!([Ctrl, Shift], Key::Character("n".into()), WindowNew);

Expand Down

0 comments on commit 147e0ee

Please sign in to comment.