Skip to content

Commit f6c738b

Browse files
committed
macOS - prevent error sound on keyboard input
1 parent f4a30f6 commit f6c738b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/Interstellar.MacOS.WebKit/BrowserWindow.fs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ type BrowserWindow(config: BrowserWindowConfig<NSWindow>) as this =
2525
do
2626
let wkBrowserController = {
2727
new NiblessViewController(browser.WebKitBrowser) with
28+
// This KeyDown override prevents the macOS beep (error) sound on key presses
29+
override this.KeyDown (event: NSEvent) = ()
2830
override this.ViewDidAppear () =
2931
base.ViewDidAppear ()
3032
shownEvt.Trigger ()

0 commit comments

Comments
 (0)