keyboard-event-handle | ios-app-dev-memo
Beep 音を避ける
swift
init() {
#if os(macOS)
NSEvent.addLocalMonitorForEvents(matching: .keyDown) { x in
// print(x)
return nil // avoid beep
}
#endif
}
Beep 音を避ける
init() {
#if os(macOS)
NSEvent.addLocalMonitorForEvents(matching: .keyDown) { x in
// print(x)
return nil // avoid beep
}
#endif
}