Skip to content

Commit

Permalink
Alternative key bindings for find next (#822)
Browse files Browse the repository at this point in the history
  • Loading branch information
cyanzhong authored Jan 18, 2025
1 parent d65c0fb commit 7a881f6
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ public extension UInt16 {
static let kVK_Delete: Self = 0x33
static let kVK_Option: Self = 0x3A
static let kVK_RightOption: Self = 0x3D
static let kVK_F3: Self = 0x63
static let kVK_LeftArrow: Self = 0x7B
static let kVK_RightArrow: Self = 0x7C
static let kVK_DownArrow: Self = 0x7D
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,16 @@ extension EditorViewController {
return nil
}

// (Alternatives) F3 to find next, Shift-F3 to find previous
if event.keyCode == .kVK_F3, let self {
if event.deviceIndependentFlags == .shift {
self.findPreviousInTextFinder()
} else {
self.findNextInTextFinder()
}
return nil
}

return event
}
}
Expand Down

0 comments on commit 7a881f6

Please sign in to comment.