Improve key event handling.

This commit is contained in:
2025-01-09 12:43:31 -08:00
parent c15691a1a1
commit 75bbcdb049
4 changed files with 43 additions and 34 deletions

View File

@@ -11,6 +11,7 @@ final class EditableNSTextField: NSTextField {
NSEvent.ModifierFlags.deviceIndependentFlagsMask.rawValue)
== commandKey
{
// TODO: Use virtual key codes instead of characters.
switch event.charactersIgnoringModifiers! {
case "x":
if NSApp.sendAction(#selector(NSText.cut(_:)),