mirror of
https://github.com/qvacua/vimr.git
synced 2024-11-28 02:54:31 +03:00
28 lines
536 B
Swift
28 lines
536 B
Swift
/**
|
|
* Tae Won Ha - http://taewon.de - @hataewon
|
|
* See LICENSE
|
|
*/
|
|
|
|
import Cocoa
|
|
|
|
class Application: NSApplication {
|
|
|
|
override init() {
|
|
setPressAndHoldSetting()
|
|
super.init()
|
|
}
|
|
|
|
required init?(coder: NSCoder) {
|
|
setPressAndHoldSetting()
|
|
super.init(coder: coder)
|
|
}
|
|
}
|
|
|
|
fileprivate func setPressAndHoldSetting() {
|
|
// disable default press and hold behavior (copied from MacVim)
|
|
CFPreferencesSetAppValue(
|
|
"ApplePressAndHoldEnabled" as NSString,
|
|
"NO" as NSString,
|
|
kCFPreferencesCurrentApplication
|
|
)
|
|
} |