mirror of
https://github.com/kiwix/kiwix-apple.git
synced 2025-09-22 11:03:21 -04:00
Use a contextual keyboard shortcut for search on macOS
This commit is contained in:
parent
0e2fa767d4
commit
60a0fa9df4
@ -81,7 +81,17 @@ struct Kiwix: App {
|
||||
CommandGroup(after: .textEditing) {
|
||||
Button(LocalString.common_search) {
|
||||
isSearchFocused = true
|
||||
}.keyboardShortcut("f", modifiers: [.command, .shift])
|
||||
}
|
||||
.keyboardShortcut("f", modifiers: [.command])
|
||||
// intentional duplicate! When on reading tab with loaded webview content
|
||||
// command + F will search the content itself
|
||||
// therefore we want command + shift + F to trigger top bar ZIM file search
|
||||
// The priority which one is picked is based on view tree hierarchy, see:
|
||||
// https://developer.apple.com/documentation/swiftui/view/keyboardshortcut(_:)#discussion
|
||||
Button(LocalString.common_search) {
|
||||
isSearchFocused = true
|
||||
}
|
||||
.keyboardShortcut("f", modifiers: [.command, .shift])
|
||||
}
|
||||
CommandGroup(replacing: .help) {}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user