mirror of
https://github.com/Toxblh/MTMR.git
synced 2026-01-13 02:08:38 +00:00
* fixed switching input source
This commit is contained in:
parent
e1268d0d65
commit
76bdf12745
@ -19,6 +19,7 @@ class InputSourceBarItem: CustomButtonTouchBarItem {
|
||||
observeIputSourceChangedNotification();
|
||||
textInputSourceDidChange()
|
||||
|
||||
self.button.cell?.action = #selector(switchInputSource)
|
||||
self.button.action = #selector(switchInputSource)
|
||||
}
|
||||
|
||||
@ -26,6 +27,11 @@ class InputSourceBarItem: CustomButtonTouchBarItem {
|
||||
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