diff --git a/iOS/Detail/DetailViewController.swift b/iOS/Detail/DetailViewController.swift index dde3bdd68..78a14b744 100644 --- a/iOS/Detail/DetailViewController.swift +++ b/iOS/Detail/DetailViewController.swift @@ -151,7 +151,7 @@ class DetailViewController: UIViewController { } @IBAction func toggleStar(_ sender: Any) { - coordinator.toggleStarForCurrentArticle() + coordinator.toggleStarredForCurrentArticle() } @IBAction func openBrowser(_ sender: Any) { diff --git a/iOS/KeyboardManager.swift b/iOS/KeyboardManager.swift index a1170bce0..95ac2f505 100644 --- a/iOS/KeyboardManager.swift +++ b/iOS/KeyboardManager.swift @@ -131,6 +131,21 @@ private extension KeyboardManager { let goToStarredTitle = NSLocalizedString("Go To Starred", comment: "Go To Starred") keys.append(createKeyCommand(title: goToStarredTitle, action: "goToStarred:", input: "3", modifiers: [.command])) + let toggleReadTitle = NSLocalizedString("Toggle Read Status", comment: "Toggle Read Status") + keys.append(createKeyCommand(title: toggleReadTitle, action: "toggleRead:", input: "U", modifiers: [.command, .shift])) + + let markAllAsReadTitle = NSLocalizedString("Mark All as Read", comment: "Mark All as Read") + keys.append(createKeyCommand(title: markAllAsReadTitle, action: "markAllAsRead:", input: "k", modifiers: [.command])) + + let markOlderAsReadTitle = NSLocalizedString("Mark Older as Read", comment: "Mark Older as Read") + keys.append(createKeyCommand(title: markOlderAsReadTitle, action: "markOlderArticlesAsRead:", input: "k", modifiers: [.command, .shift])) + + let toggleStarredTitle = NSLocalizedString("Toggle Starred Status", comment: "Toggle Starred Status") + keys.append(createKeyCommand(title: toggleStarredTitle, action: "toggleStarred:", input: "l", modifiers: [.command, .shift])) + + let openInBrowserTitle = NSLocalizedString("Open In Browser", comment: "Open In Browser") + keys.append(createKeyCommand(title: openInBrowserTitle, action: "openInBrowser:", input: UIKeyCommand.inputRightArrow, modifiers: [.command])) + return keys } diff --git a/iOS/RootSplitViewController.swift b/iOS/RootSplitViewController.swift index 7f862138a..2c4cb1171 100644 --- a/iOS/RootSplitViewController.swift +++ b/iOS/RootSplitViewController.swift @@ -87,4 +87,12 @@ class RootSplitViewController: UISplitViewController { coordinator.selectStarredFeed() } + @objc func toggleRead(_ sender: Any?) { + coordinator.toggleReadForCurrentArticle() + } + + @objc func toggleStarred(_ sender: Any?) { + coordinator.toggleStarredForCurrentArticle() + } + } diff --git a/iOS/SceneCoordinator.swift b/iOS/SceneCoordinator.swift index ad32518b9..a7c655e07 100644 --- a/iOS/SceneCoordinator.swift +++ b/iOS/SceneCoordinator.swift @@ -772,7 +772,7 @@ class SceneCoordinator: NSObject, UndoableCommandRunner, UnreadCountProvider { runCommand(markReadCommand) } - func toggleStarForCurrentArticle() { + func toggleStarredForCurrentArticle() { if let article = currentArticle { markArticles(Set([article]), statusKey: .starred, flag: !article.status.starred) }