mirror of
https://github.com/mattermost/focalboard.git
synced 2024-12-21 13:38:56 +02:00
e6b286f056
* Fix #2062. Prevent funk error sound in Mac App. * Update header
20 lines
592 B
Swift
20 lines
592 B
Swift
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
|
// See LICENSE.txt for license information.
|
|
|
|
import Foundation
|
|
import WebKit
|
|
|
|
class CustomWKWebView : WKWebView {
|
|
override func performKeyEquivalent(with event: NSEvent) -> Bool {
|
|
if (event.modifierFlags.contains(.command) && event.characters?.lowercased() != "z") ||
|
|
event.modifierFlags.contains(.control) ||
|
|
event.modifierFlags.contains(.option) {
|
|
return super.performKeyEquivalent(with: event)
|
|
}
|
|
|
|
super.performKeyEquivalent(with: event)
|
|
// Return true to prevent a "funk" error sound
|
|
return true
|
|
}
|
|
}
|