mirror of
https://github.com/Toxblh/MTMR.git
synced 2026-01-11 09:28:38 +00:00
* fixed switching input source
This commit is contained in:
parent
e1268d0d65
commit
76bdf12745
@ -19,12 +19,18 @@ class InputSourceBarItem: CustomButtonTouchBarItem {
|
||||
observeIputSourceChangedNotification();
|
||||
textInputSourceDidChange()
|
||||
|
||||
self.button.cell?.action = #selector(switchInputSource)
|
||||
self.button.action = #selector(switchInputSource)
|
||||
}
|
||||
|
||||
required init?(coder: NSCoder) {
|
||||
fatalError("init(coder:) has not been implemented")
|
||||
}
|
||||
|
||||
@objc override func handleGestureSingle(gr: NSClickGestureRecognizer) {
|
||||
super.handleGestureSingle(gr: gr)
|
||||
switchInputSource()
|
||||
}
|
||||
|
||||
@objc public func textInputSourceDidChange() {
|
||||
let currentSource = TISCopyCurrentKeyboardInputSource().takeUnretainedValue()
|
||||
|
||||
Loading…
Reference in New Issue
Block a user