feat: Add keyboard shortcuts to switch main views and create posts

I added several keyboard shortcuts so users can switch between the main
views of "Home", "DMs", "Search", and "Notifications" with the shortcuts
"CMD+1", "CMD+2" etc.. Those shortcuts made the most sense to me but
they're definitely up for discussion.

Added a new keyboard shortcut to creat a new post. Unfortunately it had
to be "SHIFT+CMD+N" because "CMD+N" already created a new window.

Closes: #163
Changelog-Added: Cmd-{1,2,3,4} to switch between tabs on MacOS
Changelog-Added: Shift-Cmd-N to create a post on MacOS
This commit is contained in:
Jonathan Milligan
2022-12-27 12:05:02 -06:00
committed by William Casarin
parent 7c132675ac
commit 393745f67c
2 changed files with 5 additions and 7 deletions
+1
View File
@@ -23,6 +23,7 @@ func PostButton(action: @escaping () -> ()) -> some View {
radius: 3,
x: 3,
y: 3)
.keyboardShortcut("n", modifiers: [.command, .shift])
}
func PostButtonContainer(action: @escaping () -> ()) -> some View {