Filesystem monitor and refactor.

This commit is contained in:
2025-02-06 17:03:16 -08:00
parent 6557993214
commit 5ed67e0cef
15 changed files with 777 additions and 481 deletions

View File

@@ -15,32 +15,31 @@ final class EditableNSTextField: NSTextField {
if event.type == NSEvent.EventType.keyDown {
if modsContains(keys: OSCmd, in: modifiers) {
if key == kVK_ANSI_X {
if NSApp.sendAction(#selector(NSText.cut(_:)),
to: nil, from: self)
{ return true }
if NSApp.sendAction(#selector(NSText.cut(_:)), to: nil, from: self) {
return true
}
} else if key == kVK_ANSI_C {
if NSApp.sendAction(#selector(NSText.copy(_:)),
to: nil, from: self)
{ return true }
if NSApp.sendAction(#selector(NSText.copy(_:)), to: nil, from: self) {
return true
}
} else if key == kVK_ANSI_V {
if NSApp.sendAction(#selector(NSText.paste(_:)),
to: nil, from: self)
{ return true }
if NSApp.sendAction(#selector(NSText.paste(_:)), to: nil, from: self) {
return true
}
} else if key == kVK_ANSI_Z {
if NSApp.sendAction(Selector(("undo:")),
to: nil, from: self)
{ return true }
if NSApp.sendAction(Selector(("undo:")), to: nil, from: self) {
return true
}
} else if key == kVK_ANSI_A {
if NSApp.sendAction(
#selector(NSResponder.selectAll(_:)), to: nil,
from: self)
{ return true }
if NSApp.sendAction(#selector(NSResponder.selectAll(_:)), to: nil, from: self) {
return true
}
}
} else if modsContains(keys: OSCmd | OSShift, in: modifiers) {
if key == kVK_ANSI_Z {
if NSApp.sendAction(Selector(("redo:")), to: nil,
from: self)
{ return true }
if NSApp.sendAction(Selector(("redo:")), to: nil, from: self) {
return true
}
}
}
}