ctlIME_Menu // Reset KeyHandler *before* toggling modes.

This commit is contained in:
ShikiSuen 2022-06-22 13:53:48 +08:00
parent 48f8a1f94a
commit 3c42dc509c
1 changed files with 8 additions and 8 deletions

View File

@ -199,6 +199,7 @@ extension ctlInputMethod {
}
@objc func toggleSCPCTypingMode(_: Any?) {
resetKeyHandler()
NotifierController.notify(
message: String(
format: "%@%@%@", NSLocalizedString("Per-Char Select Mode", comment: ""), "\n",
@ -206,10 +207,10 @@ extension ctlInputMethod {
? NSLocalizedString("NotificationSwitchON", comment: "")
: NSLocalizedString("NotificationSwitchOFF", comment: "")
))
resetKeyHandler()
}
@objc func toggleChineseConverter(_: Any?) {
resetKeyHandler()
NotifierController.notify(
message: String(
format: "%@%@%@", NSLocalizedString("Force KangXi Writing", comment: ""), "\n",
@ -217,10 +218,10 @@ extension ctlInputMethod {
? NSLocalizedString("NotificationSwitchON", comment: "")
: NSLocalizedString("NotificationSwitchOFF", comment: "")
))
resetKeyHandler()
}
@objc func toggleShiftJISShinjitaiOutput(_: Any?) {
resetKeyHandler()
NotifierController.notify(
message: String(
format: "%@%@%@", NSLocalizedString("JIS Shinjitai Output", comment: ""), "\n",
@ -228,10 +229,10 @@ extension ctlInputMethod {
? NSLocalizedString("NotificationSwitchON", comment: "")
: NSLocalizedString("NotificationSwitchOFF", comment: "")
))
resetKeyHandler()
}
@objc func toggleHalfWidthPunctuation(_: Any?) {
resetKeyHandler()
NotifierController.notify(
message: String(
format: "%@%@%@", NSLocalizedString("Half-Width Punctuation Mode", comment: ""),
@ -240,10 +241,10 @@ extension ctlInputMethod {
? NSLocalizedString("NotificationSwitchON", comment: "")
: NSLocalizedString("NotificationSwitchOFF", comment: "")
))
resetKeyHandler()
}
@objc func toggleCNS11643Enabled(_: Any?) {
resetKeyHandler()
NotifierController.notify(
message: String(
format: "%@%@%@", NSLocalizedString("CNS11643 Mode", comment: ""), "\n",
@ -251,10 +252,10 @@ extension ctlInputMethod {
? NSLocalizedString("NotificationSwitchON", comment: "")
: NSLocalizedString("NotificationSwitchOFF", comment: "")
))
resetKeyHandler()
}
@objc func toggleSymbolEnabled(_: Any?) {
resetKeyHandler()
NotifierController.notify(
message: String(
format: "%@%@%@", NSLocalizedString("Symbol & Emoji Input", comment: ""), "\n",
@ -262,10 +263,10 @@ extension ctlInputMethod {
? NSLocalizedString("NotificationSwitchON", comment: "")
: NSLocalizedString("NotificationSwitchOFF", comment: "")
))
resetKeyHandler()
}
@objc func toggleAssociatedPhrasesEnabled(_: Any?) {
resetKeyHandler()
NotifierController.notify(
message: String(
format: "%@%@%@", NSLocalizedString("Per-Char Associated Phrases", comment: ""),
@ -274,10 +275,10 @@ extension ctlInputMethod {
? NSLocalizedString("NotificationSwitchON", comment: "")
: NSLocalizedString("NotificationSwitchOFF", comment: "")
))
resetKeyHandler()
}
@objc func togglePhraseReplacement(_: Any?) {
resetKeyHandler()
NotifierController.notify(
message: String(
format: "%@%@%@", NSLocalizedString("Use Phrase Replacement", comment: ""), "\n",
@ -285,7 +286,6 @@ extension ctlInputMethod {
? NSLocalizedString("NotificationSwitchON", comment: "")
: NSLocalizedString("NotificationSwitchOFF", comment: "")
))
resetKeyHandler()
}
@objc func selfUninstall(_: Any?) {