macOS Tahoe 26.3 - System Is Playing NSBeep At Inappropriate Times When Text Editing Ends Via -cancelOperation: (field editor)

When I end editing pressing the escape key, the system sometimes plays NSBeep().

I noticed this with NSBrowser. Every time I press escape to end editing the system beeps. At first I thought it was somewhere in my app but I set a symbolic breakpoint and discovered it was not coming from my code.

I filed FB22127038.

Since then I discovered that NSBeep playing at inappropriate times is not exclusive to NSBrowser. It appears if there is a NSTableView in the window and you just press the escape key (even if you aren't editing anything) AppKit beeps. It can be traced to:

#0 0x0000000199e3184c in NSBeep ()

#1 0x000000019aa03fac in -[NSWindow doCommandBySelector:] ()

#2 0x000000019ac1d01c in -[NSTableView(NSTableViewViewBased) cancelOperation:] ()

I hit something similar today. I noticed that my external keyboard emits 4 keyDown events for the esc key. That does not happen for the MacBook keyboard, it correctly emits a single esc key down event. Are you hitting issues with an external keyboard as well?

It looks like my keyboard was messed up. After a "Soft Reset" it is working as expected now.

macOS Tahoe 26.3 - System Is Playing NSBeep At Inappropriate Times When Text Editing Ends Via -cancelOperation: (field editor)
 
 
Q