Cleaned up paths table.

This commit is contained in:
2025-01-09 18:15:20 -08:00
parent 75bbcdb049
commit df619ccc2c
10 changed files with 76 additions and 103 deletions

View File

@@ -1,10 +1,16 @@
import Cocoa
protocol EditableNSTextFieldDelegate: AnyObject {
func lostFocus()
}
final class EditableNSTextField: NSTextField {
private let commandKey = NSEvent.ModifierFlags.command.rawValue
private let commandShiftKey = NSEvent.ModifierFlags.command.rawValue |
NSEvent.ModifierFlags.shift.rawValue
weak var auxiliaryDelegate: EditableNSTextFieldDelegate?
override func performKeyEquivalent(with event: NSEvent) -> Bool {
if event.type == NSEvent.EventType.keyDown {
if (event.modifierFlags.rawValue &
@@ -50,4 +56,8 @@ final class EditableNSTextField: NSTextField {
}
return super.performKeyEquivalent(with: event)
}
override func textDidEndEditing(_ notification: Notification) {
auxiliaryDelegate?.lostFocus()
}
}