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