Pre Merge pull request !83 from ShikiSuen/upd/1.9.3

This commit is contained in:
ShikiSuen 2022-08-14 12:58:08 +00:00 committed by Gitee
commit ddc55efb2d
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
31 changed files with 383 additions and 147 deletions

@ -1 +1 @@
Subproject commit 3cb476e7c884198fe91ce7d7ccc1ac0e082e007e
Subproject commit b5e6f15c198f87c4cf0227bc6d9b4346e86228a0

View File

@ -18,6 +18,7 @@ import Cocoa
/// KeyHandler
protocol KeyHandlerDelegate {
var clientBundleIdentifier: String { get }
func ctlCandidate() -> ctlCandidateProtocol
func keyHandler(
_: KeyHandler, didSelectCandidateAt index: Int,

View File

@ -347,6 +347,18 @@ extension KeyHandler {
}
}
// MARK: - Flipping pages by using symbol menu keys (when they are not occupied).
if input.isSymbolMenuPhysicalKey {
let updated: Bool =
input.isShiftHold ? ctlCandidateCurrent.showPreviousPage() : ctlCandidateCurrent.showNextPage()
if !updated {
IME.prtDebugIntel("66F3477B")
errorCallback()
}
return true
}
IME.prtDebugIntel("172A0F81")
errorCallback()
return true

View File

@ -347,7 +347,7 @@ extension KeyHandler {
composingBuffer = Tekkon.cnvPhonaToHanyuPinyin(target: composingBuffer) //
}
if !IME.areWeUsingOurOwnPhraseEditor {
if let delegate = delegate, !delegate.clientBundleIdentifier.contains("vChewingPhraseEditor") {
composingBuffer = composingBuffer.replacingOccurrences(of: "-", with: " ")
}

View File

@ -40,6 +40,16 @@ class ctlInputMethod: IMKInputController {
/// ctlInputMethod
var isASCIIMode: Bool = false
///
public var isVerticalTyping: Bool {
guard let client = client() else { return false }
var textFrame = NSRect.zero
let attributes: [AnyHashable: Any]? = client.attributes(
forCharacterIndex: 0, lineHeightRectangle: &textFrame
)
return (attributes?["IMKTextOrientation"] as? NSNumber)?.intValue == 0 || false
}
/// ctlInputMethod
func toggleASCIIMode() -> Bool {
resetKeyHandler()
@ -54,7 +64,9 @@ class ctlInputMethod: IMKInputController {
///
func setKeyLayout() {
client().overrideKeyboard(withKeyboardNamed: mgrPrefs.basicKeyboardLayout)
if let client = client() {
client.overrideKeyboard(withKeyboardNamed: mgrPrefs.basicKeyboardLayout)
}
}
/// 調
@ -95,11 +107,15 @@ class ctlInputMethod: IMKInputController {
// activateServer nil
//
if keyHandler.delegate == nil { keyHandler.delegate = self }
setValue(IME.currentInputMode.rawValue, forTag: 114_514, client: client())
guard let client = client() else { return }
setValue(IME.currentInputMode.rawValue, forTag: 114_514, client: client)
keyHandler.clear() // handle State.Empty()
keyHandler.ensureParser()
if isASCIIMode {
if mgrPrefs.disableShiftTogglingAlphanumericalMode {
isASCIIMode = false
} else {
NotifierController.notify(
message: String(
format: "%@%@%@", NSLocalizedString("Alphanumerical Mode", comment: ""), "\n",
@ -108,10 +124,11 @@ class ctlInputMethod: IMKInputController {
: NSLocalizedString("NotificationSwitchOFF", comment: "")
))
}
}
///
/// macOS
if client().bundleIdentifier() != Bundle.main.bundleIdentifier {
if client.bundleIdentifier() != Bundle.main.bundleIdentifier {
// 使
setKeyLayout()
handle(state: InputState.Empty())
@ -152,7 +169,7 @@ class ctlInputMethod: IMKInputController {
keyHandler.inputMode = newInputMode
///
/// macOS
if client().bundleIdentifier() != Bundle.main.bundleIdentifier {
if let client = client(), client.bundleIdentifier() != Bundle.main.bundleIdentifier {
// 使
setKeyLayout()
handle(state: InputState.Empty())
@ -189,9 +206,12 @@ class ctlInputMethod: IMKInputController {
_ = sender //
// Shift macOS 10.15 macOS
let shouldUseHandle =
(IME.arrClientShiftHandlingExceptionList.contains(clientBundleIdentifier)
|| mgrPrefs.shouldAlwaysUseShiftKeyAccommodation)
if #available(macOS 10.15, *) {
if ShiftKeyUpChecker.check(event) {
if !rencentKeyHandledByKeyHandler {
if ShiftKeyUpChecker.check(event), !mgrPrefs.disableShiftTogglingAlphanumericalMode {
if !shouldUseHandle || (!rencentKeyHandledByKeyHandler && shouldUseHandle) {
NotifierController.notify(
message: String(
format: "%@%@%@", NSLocalizedString("Alphanumerical Mode", comment: ""), "\n",
@ -201,7 +221,9 @@ class ctlInputMethod: IMKInputController {
)
)
}
if shouldUseHandle {
rencentKeyHandledByKeyHandler = false
}
return false
}
}
@ -221,24 +243,7 @@ class ctlInputMethod: IMKInputController {
//
ctlInputMethod.areWeNerfing = event.modifierFlags.contains([.shift, .command])
var textFrame = NSRect.zero
let attributes: [AnyHashable: Any]? = client().attributes(
forCharacterIndex: 0, lineHeightRectangle: &textFrame
)
let isTypingVertical =
(attributes?["IMKTextOrientation"] as? NSNumber)?.intValue == 0 || false
if client().bundleIdentifier()
== "org.atelierInmu.vChewing.vChewingPhraseEditor"
{
IME.areWeUsingOurOwnPhraseEditor = true
} else {
IME.areWeUsingOurOwnPhraseEditor = false
}
var input = InputSignal(event: event, isVerticalTyping: isTypingVertical)
var input = InputSignal(event: event, isVerticalTyping: isVerticalTyping)
input.isASCIIModeInput = isASCIIMode
//
@ -254,7 +259,9 @@ class ctlInputMethod: IMKInputController {
} errorCallback: {
clsSFX.beep()
}
if shouldUseHandle {
rencentKeyHandledByKeyHandler = result
}
return result
}
@ -267,34 +274,59 @@ class ctlInputMethod: IMKInputController {
resetKeyHandler()
}
// MARK: - IMKCandidates
/// IMK
/// - Parameter sender: 使
/// - Returns: IMK
override func candidates(_ sender: Any!) -> [Any]! {
_ = sender //
var arrResult = [String]()
//
if let state = state as? InputState.AssociatedPhrases {
return state.candidates.map { theCandidate -> String in
for theCandidate in state.candidates {
let theConverted = IME.kanjiConversionIfRequired(theCandidate.1)
return (theCandidate.1 == theConverted) ? theCandidate.1 : "\(theConverted)(\(theCandidate.1))"
var result = (theCandidate.1 == theConverted) ? theCandidate.1 : "\(theConverted)(\(theCandidate.1))"
if arrResult.contains(result) {
result = "\(result)(\(theCandidate.0))"
}
arrResult.append(result)
}
} else if let state = state as? InputState.SymbolTable {
return state.candidates.map { theCandidate -> String in
for theCandidate in state.candidates {
let theConverted = IME.kanjiConversionIfRequired(theCandidate.1)
return (theCandidate.1 == theConverted) ? theCandidate.1 : "\(theConverted)(\(theCandidate.1))"
var result = (theCandidate.1 == theConverted) ? theCandidate.1 : "\(theConverted)(\(theCandidate.1))"
if arrResult.contains(result) {
result = "\(result)(\(theCandidate.0))"
}
arrResult.append(result)
}
} else if let state = state as? InputState.ChoosingCandidate {
return state.candidates.map { theCandidate -> String in
for theCandidate in state.candidates {
let theConverted = IME.kanjiConversionIfRequired(theCandidate.1)
return (theCandidate.1 == theConverted) ? theCandidate.1 : "\(theConverted)(\(theCandidate.1))"
var result = (theCandidate.1 == theConverted) ? theCandidate.1 : "\(theConverted)(\(theCandidate.1))"
if arrResult.contains(result) {
result = "\(result)(\(theCandidate.0))"
}
arrResult.append(result)
}
}
return .init()
return arrResult
}
/// IMK
/// - Parameter _:
override open func candidateSelectionChanged(_: NSAttributedString!) {
//
//
// ctlCandidateIMK identifier
// NSNotFound NSLog identifier
// console ips
// candidateSelected() identifier NSNotFound
// IMK 西
}
/// IMK
/// - Parameter candidateString:
override open func candidateSelected(_ candidateString: NSAttributedString!) {
if state is InputState.AssociatedPhrases {
if !mgrPrefs.alsoConfirmAssociatedCandidatesByEnter {
@ -305,28 +337,44 @@ class ctlInputMethod: IMKInputController {
}
var indexDeducted = 0
//
if let state = state as? InputState.AssociatedPhrases {
for (i, neta) in state.candidates.map(\.1).enumerated() {
let theConverted = IME.kanjiConversionIfRequired(neta)
let netaShown = (neta == theConverted) ? neta : "\(theConverted)(\(neta))"
for (i, neta) in state.candidates.enumerated() {
let theConverted = IME.kanjiConversionIfRequired(neta.1)
let netaShown = (neta.1 == theConverted) ? neta.1 : "\(theConverted)(\(neta.1))"
let netaShownWithPronunciation = "\(theConverted)(\(neta.0))"
if candidateString.string == netaShownWithPronunciation {
indexDeducted = i
break
}
if candidateString.string == netaShown {
indexDeducted = i
break
}
}
} else if let state = state as? InputState.SymbolTable {
for (i, neta) in state.candidates.map(\.1).enumerated() {
let theConverted = IME.kanjiConversionIfRequired(neta)
let netaShown = (neta == theConverted) ? neta : "\(theConverted)(\(neta))"
for (i, neta) in state.candidates.enumerated() {
let theConverted = IME.kanjiConversionIfRequired(neta.1)
let netaShown = (neta.1 == theConverted) ? neta.1 : "\(theConverted)(\(neta.1))"
let netaShownWithPronunciation = "\(theConverted)(\(neta.0))"
if candidateString.string == netaShownWithPronunciation {
indexDeducted = i
break
}
if candidateString.string == netaShown {
indexDeducted = i
break
}
}
} else if let state = state as? InputState.ChoosingCandidate {
for (i, neta) in state.candidates.map(\.1).enumerated() {
let theConverted = IME.kanjiConversionIfRequired(neta)
let netaShown = (neta == theConverted) ? neta : "\(theConverted)(\(neta))"
for (i, neta) in state.candidates.enumerated() {
let theConverted = IME.kanjiConversionIfRequired(neta.1)
let netaShown = (neta.1 == theConverted) ? neta.1 : "\(theConverted)(\(neta.1))"
let netaShownWithPronunciation = "\(theConverted)(\(neta.0))"
if candidateString.string == netaShownWithPronunciation {
indexDeducted = i
break
}
if candidateString.string == netaShown {
indexDeducted = i
break

View File

@ -13,6 +13,8 @@ import Cocoa
// MARK: - KeyHandler Delegate
extension ctlInputMethod: KeyHandlerDelegate {
var clientBundleIdentifier: String { client()?.bundleIdentifier() ?? "" }
func ctlCandidate() -> ctlCandidateProtocol { ctlInputMethod.ctlCandidateCurrent }
func keyHandler(
@ -50,11 +52,20 @@ extension ctlInputMethod: KeyHandlerDelegate {
// MARK: - Candidate Controller Delegate
extension ctlInputMethod: ctlCandidateDelegate {
var isAssociatedPhrasesMode: Bool { state is InputState.AssociatedPhrases }
/// handle() IMK
/// handle()
/// - Parameter event: IMK
/// - Returns: `true` IMK`false`
func handleDelegateEvent(_ event: NSEvent!) -> Bool {
// Shift macOS 10.15 macOS
let shouldUseHandle =
(IME.arrClientShiftHandlingExceptionList.contains(clientBundleIdentifier)
|| mgrPrefs.shouldAlwaysUseShiftKeyAccommodation)
if #available(macOS 10.15, *) {
if ShiftKeyUpChecker.check(event) {
if !rencentKeyHandledByKeyHandler {
if ShiftKeyUpChecker.check(event), !mgrPrefs.disableShiftTogglingAlphanumericalMode {
if !shouldUseHandle || (!rencentKeyHandledByKeyHandler && shouldUseHandle) {
NotifierController.notify(
message: String(
format: "%@%@%@", NSLocalizedString("Alphanumerical Mode", comment: ""), "\n",
@ -64,7 +75,9 @@ extension ctlInputMethod: ctlCandidateDelegate {
)
)
}
if shouldUseHandle {
rencentKeyHandledByKeyHandler = false
}
return false
}
}
@ -78,24 +91,7 @@ extension ctlInputMethod: ctlCandidateDelegate {
//
ctlInputMethod.areWeNerfing = event.modifierFlags.contains([.shift, .command])
var textFrame = NSRect.zero
let attributes: [AnyHashable: Any]? = client().attributes(
forCharacterIndex: 0, lineHeightRectangle: &textFrame
)
let isTypingVertical =
(attributes?["IMKTextOrientation"] as? NSNumber)?.intValue == 0 || false
if client().bundleIdentifier()
== "org.atelierInmu.vChewing.vChewingPhraseEditor"
{
IME.areWeUsingOurOwnPhraseEditor = true
} else {
IME.areWeUsingOurOwnPhraseEditor = false
}
var input = InputSignal(event: event, isVerticalTyping: isTypingVertical)
var input = InputSignal(event: event, isVerticalTyping: isVerticalTyping)
input.isASCIIModeInput = isASCIIMode
//
@ -106,12 +102,15 @@ extension ctlInputMethod: ctlCandidateDelegate {
/// 調
/// result bool IMK
let result = keyHandler.handleCandidate(state: state, input: input) { newState in
/// keyHandler.handleCandidate()
let result = keyHandler.handle(input: input, state: state) { newState in
self.handle(state: newState)
} errorCallback: {
clsSFX.beep()
}
if shouldUseHandle {
rencentKeyHandledByKeyHandler = result
}
return result
}

View File

@ -15,13 +15,14 @@ import Foundation
extension ctlInputMethod {
func show(tooltip: String, composingBuffer: String, cursorIndex: Int) {
guard let client = client() else { return }
var lineHeightRect = NSRect(x: 0.0, y: 0.0, width: 16.0, height: 16.0)
var cursor = cursorIndex
if cursor == composingBuffer.count, cursor != 0 {
cursor -= 1
}
while lineHeightRect.origin.x == 0, lineHeightRect.origin.y == 0, cursor >= 0 {
client().attributes(
client.attributes(
forCharacterIndex: cursor, lineHeightRectangle: &lineHeightRect
)
cursor -= 1
@ -30,6 +31,7 @@ extension ctlInputMethod {
}
func show(candidateWindowWith state: InputStateProtocol) {
guard let client = client() else { return }
var isTypingVertical: Bool {
if let state = state as? InputState.ChoosingCandidate {
return state.isTypingVertical
@ -153,7 +155,7 @@ extension ctlInputMethod {
}
while lineHeightRect.origin.x == 0, lineHeightRect.origin.y == 0, cursor >= 0 {
client().attributes(
client.attributes(
forCharacterIndex: cursor, lineHeightRectangle: &lineHeightRect
)
cursor -= 1

View File

@ -47,8 +47,9 @@ extension ctlInputMethod {
/// .NotEmpty()
private func setInlineDisplayWithCursor() {
guard let client = client() else { return }
if let state = state as? InputState.AssociatedPhrases {
client().setMarkedText(
client.setMarkedText(
state.attributedString, selectionRange: NSRange(location: 0, length: 0),
replacementRange: NSRange(location: NSNotFound, length: NSNotFound)
)
@ -94,7 +95,7 @@ extension ctlInputMethod {
/// selectionRange
/// 0 replacementRangeNSNotFound
///
client().setMarkedText(
client.setMarkedText(
state.attributedString, selectionRange: NSRange(location: state.cursorIndex, length: 0),
replacementRange: NSRange(location: NSNotFound, length: NSNotFound)
)
@ -113,12 +114,12 @@ extension ctlInputMethod {
///
/// IMK commitComposition
private func commit(text: String) {
guard let client = client() else { return }
let buffer = IME.kanjiConversionIfRequired(text)
if buffer.isEmpty {
return
}
client().insertText(
client.insertText(
buffer, replacementRange: NSRange(location: NSNotFound, length: NSNotFound)
)
}

View File

@ -23,6 +23,18 @@ public enum IME {
static let arrSupportedLocales = ["en", "zh-Hant", "zh-Hans", "ja"]
static let dlgOpenPath = NSOpenPanel()
// MARK: - Bundle Identifier
/// Bundle Identifier Shift
static let arrClientShiftHandlingExceptionList = [
"com.avast.browser", "com.brave.Browser", "com.brave.Browser.beta", "com.coccoc.Coccoc", "com.fenrir-inc.Sleipnir",
"com.google.Chrome", "com.google.Chrome.beta", "com.google.Chrome.canary", "com.hiddenreflex.Epic",
"com.maxthon.Maxthon", "com.microsoft.edgemac", "com.microsoft.edgemac.Canary", "com.microsoft.edgemac.Dev",
"com.naver.Whale", "com.operasoftware.Opera", "com.valvesoftware.steam", "com.vivaldi.Vivaldi",
"net.qihoo.360browser", "org.blisk.Blisk", "org.chromium.Chromium", "org.qt-project.Qt.QtWebEngineCore",
"ru.yandex.desktop.yandex-browser",
]
// MARK: -
static var currentInputMode: InputMode = .init(rawValue: mgrPrefs.mostRecentInputMode) ?? .imeModeNULL
@ -40,10 +52,6 @@ public enum IME {
return text
}
// MARK: -
static var areWeUsingOurOwnPhraseEditor: Bool = false
// MARK: - ctlInputMethod
static func getInputMode(isReversed: Bool = false) -> InputMode {

View File

@ -49,8 +49,11 @@ public enum UserDef: String, CaseIterable {
case kKeepReadingUponCompositionError = "KeepReadingUponCompositionError"
case kTogglingAlphanumericalModeWithLShift = "TogglingAlphanumericalModeWithLShift"
case kUpperCaseLetterKeyBehavior = "UpperCaseLetterKeyBehavior"
case kUseIMKCandidateWindow = "UseIMKCandidateWindow"
case kHandleDefaultCandidateFontsByLangIdentifier = "HandleDefaultCandidateFontsByLangIdentifier"
case kShouldAlwaysUseShiftKeyAccommodation = "ShouldAlwaysUseShiftKeyAccommodation"
case kDisableShiftTogglingAlphanumericalMode = "DisableShiftTogglingAlphanumericalMode"
case kCandidateTextFontName = "CandidateTextFontName"
case kCandidateKeyLabelFontName = "CandidateKeyLabelFontName"
@ -277,6 +280,9 @@ public enum mgrPrefs {
UserDefaults.standard.setDefault(
mgrPrefs.upperCaseLetterKeyBehavior, forKey: UserDef.kUpperCaseLetterKeyBehavior.rawValue
)
// -----
UserDefaults.standard.setDefault(
mgrPrefs.useIMKCandidateWindow, forKey: UserDef.kUseIMKCandidateWindow.rawValue
)
@ -284,6 +290,11 @@ public enum mgrPrefs {
mgrPrefs.handleDefaultCandidateFontsByLangIdentifier,
forKey: UserDef.kHandleDefaultCandidateFontsByLangIdentifier.rawValue
)
UserDefaults.standard.setDefault(
mgrPrefs.shouldAlwaysUseShiftKeyAccommodation, forKey: UserDef.kShouldAlwaysUseShiftKeyAccommodation.rawValue
)
// -----
UserDefaults.standard.setDefault(mgrPrefs.usingHotKeySCPC, forKey: UserDef.kUsingHotKeySCPC.rawValue)
UserDefaults.standard.setDefault(mgrPrefs.usingHotKeyAssociates, forKey: UserDef.kUsingHotKeyAssociates.rawValue)
@ -388,6 +399,8 @@ public enum mgrPrefs {
@UserDefault(key: UserDef.kUpperCaseLetterKeyBehavior.rawValue, defaultValue: 0)
static var upperCaseLetterKeyBehavior: Int
// MARK: - Settings (Tier 2)
@UserDefault(key: UserDef.kUseIMKCandidateWindow.rawValue, defaultValue: false)
static var useIMKCandidateWindow: Bool {
didSet {
@ -399,7 +412,13 @@ public enum mgrPrefs {
@UserDefault(key: UserDef.kHandleDefaultCandidateFontsByLangIdentifier.rawValue, defaultValue: false)
static var handleDefaultCandidateFontsByLangIdentifier: Bool
// MARK: - Settings (Tier 2)
@UserDefault(key: UserDef.kShouldAlwaysUseShiftKeyAccommodation.rawValue, defaultValue: false)
static var shouldAlwaysUseShiftKeyAccommodation: Bool
@UserDefault(key: UserDef.kDisableShiftTogglingAlphanumericalMode.rawValue, defaultValue: false)
static var disableShiftTogglingAlphanumericalMode: Bool
// MARK: - Settings (Tier 3)
@UserDefault(key: UserDef.kTogglingAlphanumericalModeWithLShift.rawValue, defaultValue: true)
static var togglingAlphanumericalModeWithLShift: Bool

View File

@ -57,7 +57,7 @@ extension Megrez.Compositor {
///
///
/// location - 1
/// location - 1
/// - Parameter location:
/// - Returns:
public func fetchCandidates(at location: Int, filter: CandidateFetchFilter = .all) -> [Candidate] {
@ -105,7 +105,7 @@ extension Megrez.Compositor {
/// 使
///
///
///
/// - Parameters:
/// - candidate:
/// - location:

View File

@ -17,20 +17,20 @@ extension Megrez.Compositor {
/// [("a", -114), ("b", -514), ("c", -1919)]
/// ("c", -114)使
///
/// kOverridingScore
/// - withHighScore: kOverridingScore使
/// kOverridingScore
/// - withHighScore: kOverridingScore使
public enum OverrideType: Int {
case withNoOverrides = 0
case withTopUnigramScore = 1
case withHighScore = 2
}
///
/// 0使
///
/// 0使
/// a b cA B C使
/// c bc
/// c bc
/// A->bc A B 使0
/// A-B 0
/// A-B 0
/// c
public static let kOverridingScore: Double = 114_514

View File

@ -27,6 +27,7 @@ public class CandidateKeyLabel: NSObject {
}
public protocol ctlCandidateDelegate: AnyObject {
var isAssociatedPhrasesMode: Bool { get }
func handleDelegateEvent(_ event: NSEvent!) -> Bool
func candidateCountForController(_ controller: ctlCandidateProtocol) -> Int
func candidatesForController(_ controller: ctlCandidateProtocol) -> [(String, String)]

View File

@ -11,7 +11,9 @@ import InputMethodKit
public class ctlCandidateIMK: IMKCandidates, ctlCandidateProtocol {
public var currentLayout: CandidateLayout = .horizontal
private let defaultIMKSelectionKey: [UInt16: String] = [
18: "1", 19: "2", 20: "3", 21: "4", 23: "5", 22: "6", 26: "7", 28: "8", 25: "9",
]
public weak var delegate: ctlCandidateDelegate? {
didSet {
reloadData()
@ -70,6 +72,9 @@ public class ctlCandidateIMK: IMKCandidates, ctlCandidateProtocol {
super.init(server: theServer, panelType: kIMKScrollingGridCandidatePanel)
specifyLayout(layout)
visible = false
// guard let currentTISInputSource = currentTISInputSource else { return } //
// setSelectionKeys([18, 19, 20, 21, 23, 22, 26, 28, 25]) //
// setSelectionKeysKeylayout(currentTISInputSource) //
}
@available(*, unavailable)
@ -110,7 +115,12 @@ public class ctlCandidateIMK: IMKCandidates, ctlCandidateProtocol {
currentPageIndex = (currentPageIndex + 1 >= pageCount) ? 0 : currentPageIndex + 1
if selectedCandidateIndex == candidates(self).count - 1 { return false }
selectedCandidateIndex = min(selectedCandidateIndex + keyCount, candidates(self).count - 1)
pageDownAndModifySelection(self)
switch currentLayout {
case .horizontal:
moveDown(self)
case .vertical:
moveRight(self)
}
return true
}
@ -121,7 +131,12 @@ public class ctlCandidateIMK: IMKCandidates, ctlCandidateProtocol {
currentPageIndex = (currentPageIndex == 0) ? pageCount - 1 : currentPageIndex - 1
if selectedCandidateIndex == 0 { return true }
selectedCandidateIndex = max(selectedCandidateIndex - keyCount, 0)
pageUpAndModifySelection(self)
switch currentLayout {
case .horizontal:
moveUp(self)
case .vertical:
moveLeft(self)
}
return true
}
@ -226,14 +241,97 @@ public class ctlCandidateIMK: IMKCandidates, ctlCandidateProtocol {
}
override public func interpretKeyEvents(_ eventArray: [NSEvent]) {
//
// Objective-C nil
guard !eventArray.isEmpty else { return }
var eventArray = eventArray
let event = eventArray[0]
let input = InputSignal(event: event)
guard let delegate = delegate else { return }
if input.isEsc || input.isBackSpace || input.isDelete || input.isShiftHold {
if input.isEsc || input.isBackSpace || input.isDelete || (input.isShiftHold && !input.isSpace) {
_ = delegate.handleDelegateEvent(event)
} else if input.isSymbolMenuPhysicalKey || input.isSpace {
if input.isShiftHold {
switch currentLayout {
case .horizontal:
moveUp(self)
case .vertical:
moveLeft(self)
}
} else {
switch currentLayout {
case .horizontal:
moveDown(self)
case .vertical:
moveRight(self)
}
}
} else if input.isTab {
switch currentLayout {
case .horizontal:
if input.isShiftHold {
moveLeft(self)
} else {
moveRight(self)
}
case .vertical:
if input.isShiftHold {
moveUp(self)
} else {
moveDown(self)
}
}
} else {
if let newChar = defaultIMKSelectionKey[event.keyCode] {
/// KeyCode NSEvent Character
/// IMK
let newEvent = NSEvent.keyEvent(
with: event.type,
location: event.locationInWindow,
modifierFlags: event.modifierFlags,
timestamp: event.timestamp,
windowNumber: event.windowNumber,
context: nil,
characters: newChar,
charactersIgnoringModifiers: event.charactersIgnoringModifiers ?? event.characters ?? "",
isARepeat: event.isARepeat,
keyCode: event.keyCode
)
if let newEvent = newEvent {
/// NSEvent
eventArray = Array(eventArray.dropFirst(0))
eventArray.insert(newEvent, at: 0)
}
}
if delegate.isAssociatedPhrasesMode,
!input.isPageUp, !input.isPageDown, !input.isCursorForward, !input.isCursorBackward,
!input.isCursorClockLeft, !input.isCursorClockRight, !input.isSpace,
!input.isEnter || !mgrPrefs.alsoConfirmAssociatedCandidatesByEnter
{
_ = delegate.handleDelegateEvent(event)
return
}
super.interpretKeyEvents(eventArray)
}
}
}
// MARK: - Generate TISInputSource Object
/// "com.apple.keylayout.ABC" TISInputSource
/// 西
/// IME.swift
var currentTISInputSource: TISInputSource? {
var result: TISInputSource?
let list = TISCreateInputSourceList(nil, true).takeRetainedValue() as! [TISInputSource]
let matchedTISString = "com.apple.keylayout.ABC"
for source in list {
guard let ptrCat = TISGetInputSourceProperty(source, kTISPropertyInputSourceCategory) else { continue }
let category = Unmanaged<CFString>.fromOpaque(ptrCat).takeUnretainedValue()
guard category == kTISCategoryKeyboardInputSource else { continue }
guard let ptrSourceID = TISGetInputSourceProperty(source, kTISPropertyInputSourceID) else { continue }
let sourceID = String(Unmanaged<CFString>.fromOpaque(ptrSourceID).takeUnretainedValue())
if sourceID == matchedTISString { result = source }
}
return result
}

View File

@ -13,7 +13,10 @@ import Cocoa
// Zonble Voltaire
private class vwrCandidateUniversal: NSView {
var highlightedIndex: Int = 0 { didSet { highlightedIndex = max(highlightedIndex, 0) } }
var highlightedIndex: Int = 0 {
didSet { highlightedIndex = min(max(highlightedIndex, 0), dispCandidatesWithLabels.count - 1) }
}
var action: Selector?
weak var target: AnyObject?
var isVerticalLayout: Bool = false
@ -181,8 +184,8 @@ private class vwrCandidateUniversal: NSView {
.withAlphaComponent(0.84)
// Highlightened phrase text color
activeCandidateAttr[.foregroundColor] = NSColor.selectedMenuItemTextColor
} else {
NSColor.controlBackgroundColor.setFill()
let path: NSBezierPath = .init(roundedRect: rctCandidateArea, xRadius: 6, yRadius: 6)
path.fill()
}
if mgrPrefs.handleDefaultCandidateFontsByLangIdentifier {
switch IME.currentInputMode {
@ -200,8 +203,6 @@ private class vwrCandidateUniversal: NSView {
break
}
}
let path: NSBezierPath = .init(roundedRect: rctCandidateArea, xRadius: 5, yRadius: 5)
path.fill()
(keyLabels[index] as NSString).draw(
in: rctLabel, withAttributes: activeCandidateIndexAttr
)
@ -254,8 +255,8 @@ private class vwrCandidateUniversal: NSView {
.withAlphaComponent(0.84)
// Highlightened phrase text color
activeCandidateAttr[.foregroundColor] = NSColor.selectedMenuItemTextColor
} else {
NSColor.controlBackgroundColor.setFill()
let path: NSBezierPath = .init(roundedRect: rctCandidateArea, xRadius: 6, yRadius: 6)
path.fill()
}
if mgrPrefs.handleDefaultCandidateFontsByLangIdentifier {
switch IME.currentInputMode {
@ -273,8 +274,6 @@ private class vwrCandidateUniversal: NSView {
break
}
}
let path: NSBezierPath = .init(roundedRect: rctCandidateArea, xRadius: 5, yRadius: 5)
path.fill()
(keyLabels[index] as NSString).draw(
in: rctLabel, withAttributes: activeCandidateIndexAttr
)
@ -379,11 +378,10 @@ public class ctlCandidateUniversal: ctlCandidate {
candidateView = vwrCandidateUniversal(frame: contentRect)
candidateView.wantsLayer = true
candidateView.layer?.borderColor =
NSColor.selectedMenuItemTextColor.withAlphaComponent(0.20).cgColor
candidateView.layer?.borderWidth = 1.0
// candidateView.layer?.borderColor = NSColor.selectedMenuItemTextColor.withAlphaComponent(0.20).cgColor
// candidateView.layer?.borderWidth = 1.0
if #available(macOS 10.13, *) {
candidateView.layer?.cornerRadius = 8.0
candidateView.layer?.cornerRadius = 9.0
}
panel.contentView?.addSubview(candidateView)
@ -462,7 +460,10 @@ public class ctlCandidateUniversal: ctlCandidate {
if pageCount == 1 { return highlightNextCandidate() }
if currentPageIndex + 1 >= pageCount { clsSFX.beep() }
currentPageIndex = (currentPageIndex + 1 >= pageCount) ? 0 : currentPageIndex + 1
candidateView.highlightedIndex = 0
if currentPageIndex == pageCount - 1 {
candidateView.highlightedIndex = min(lastPageContentCount - 1, candidateView.highlightedIndex)
}
// candidateView.highlightedIndex = 0
layoutCandidateView()
return true
}
@ -472,7 +473,10 @@ public class ctlCandidateUniversal: ctlCandidate {
if pageCount == 1 { return highlightPreviousCandidate() }
if currentPageIndex == 0 { clsSFX.beep() }
currentPageIndex = (currentPageIndex == 0) ? pageCount - 1 : currentPageIndex - 1
candidateView.highlightedIndex = 0
if currentPageIndex == pageCount - 1 {
candidateView.highlightedIndex = min(lastPageContentCount - 1, candidateView.highlightedIndex)
}
// candidateView.highlightedIndex = 0
layoutCandidateView()
return true
}
@ -530,6 +534,15 @@ extension ctlCandidateUniversal {
return totalCount / keyLabelCount + ((totalCount % keyLabelCount) != 0 ? 1 : 0)
}
private var lastPageContentCount: Int {
guard let delegate = delegate else {
return 0
}
let totalCount = delegate.candidateCountForController(self)
let keyLabelCount = keyLabels.count
return totalCount % keyLabelCount
}
private func layoutCandidateView() {
guard let delegate = delegate else {
return

View File

@ -14,6 +14,10 @@ struct suiPrefPaneDevZone: View {
forKey: UserDef.kUseIMKCandidateWindow.rawValue)
@State private var selHandleDefaultCandidateFontsByLangIdentifier: Bool = UserDefaults.standard.bool(
forKey: UserDef.kHandleDefaultCandidateFontsByLangIdentifier.rawValue)
@State private var selShouldAlwaysUseShiftKeyAccommodation: Bool = UserDefaults.standard.bool(
forKey: UserDef.kShouldAlwaysUseShiftKeyAccommodation.rawValue)
@State private var selDisableShiftTogglingAlphanumericalMode: Bool = UserDefaults.standard.bool(
forKey: UserDef.kDisableShiftTogglingAlphanumericalMode.rawValue)
private let contentWidth: Double = {
switch mgrPrefs.appleLanguages[0] {
case "ja":
@ -56,6 +60,24 @@ struct suiPrefPaneDevZone: View {
)
)
.preferenceDescription().fixedSize(horizontal: false, vertical: true)
Toggle(
LocalizedStringKey("Use Shift Key Accommodation in all cases"),
isOn: $selShouldAlwaysUseShiftKeyAccommodation.onChange {
mgrPrefs.shouldAlwaysUseShiftKeyAccommodation = selShouldAlwaysUseShiftKeyAccommodation
}
)
Text(
LocalizedStringKey(
"Some client apps (like Chromium-cored browsers: MS Edge, Google Chrome, etc.) may duplicate Shift-key inputs due to their internal bugs, and their devs are less likely to fix their bugs of such. vChewing has its accommodation procedures enabled by default for known Chromium-cored browsers. If you want the same accommodation for other client apps, please tick this checkbox on."
)
)
.preferenceDescription().fixedSize(horizontal: false, vertical: true)
Toggle(
LocalizedStringKey("Completely disable using Shift key to toggling alphanumerical mode"),
isOn: $selDisableShiftTogglingAlphanumericalMode.onChange {
mgrPrefs.disableShiftTogglingAlphanumericalMode = selDisableShiftTogglingAlphanumericalMode
}
)
}
}
}

View File

@ -162,7 +162,7 @@ struct suiPrefPaneExperience: View {
mgrPrefs.useSCPCTypingMode = selEnableSCPCTypingMode
}
)
Text(LocalizedStringKey("An accomodation for elder computer users."))
Text(LocalizedStringKey("An accommodation for elder computer users."))
.preferenceDescription()
}
}

View File

@ -93,7 +93,7 @@
"Allow using Enter key to confirm associated candidate selection" = "Allow using Enter key to confirm associated candidate selection";
"Also toggle alphanumerical mode with Left-Shift" = "Also toggle alphanumerical mode with Left-Shift";
"Always use fixed listing order in candidate window" = "Always use fixed listing order in candidate window";
"An accomodation for elder computer users." = "An accomodation for elder computer users.";
"An accommodation for elder computer users." = "An accommodation for elder computer users.";
"Apple ABC (equivalent to English US)" = "Apple ABC (equivalent to English US)";
"Apple Chewing - Dachen" = "Apple Chewing - Dachen";
"Apple Chewing - Eten Traditional" = "Apple Chewing - Eten Traditional";
@ -164,6 +164,7 @@
"Show Hanyu-Pinyin in the inline composition buffer & tooltip" = "Show Hanyu-Pinyin in the inline composition buffer & tooltip";
"Show page buttons in candidate window" = "Show page buttons in candidate window";
"Simplified Chinese" = "Simplified Chinese";
"Some client apps (like Chromium-cored browsers: MS Edge, Google Chrome, etc.) may duplicate Shift-key inputs due to their internal bugs, and their devs are less likely to fix their bugs of such. vChewing has its accommodation procedures enabled by default for known Chromium-cored browsers. If you want the same accommodation for other client apps, please tick this checkbox on." = "Some client apps (like Chromium-cored browsers: MS Edge, Google Chrome, etc.) may duplicate Shift-key inputs due to their internal bugs, and their devs are less likely to fix their bugs of such. vChewing has its accommodation procedures enabled by default for known Chromium-cored browsers. If you want the same accommodation for other client apps, please tick this checkbox on.";
"Space to +cycle candidates, Shift+Space to +cycle pages" = "Space to +cycle candidates, Shift+Space to +cycle pages";
"Space to +cycle pages, Shift+Space to +cycle candidates" = "Space to +cycle pages, Shift+Space to +cycle candidates";
"Starlight" = "Starlight";
@ -177,6 +178,7 @@
"Use .langIdentifier to handle UI fonts in candidate window" = "Use .langIdentifier to handle UI fonts in candidate window";
"Use ESC key to clear the entire input buffer" = "Use ESC key to clear the entire input buffer";
"Use IMK Candidate Window instead (will reboot the IME)" = "Use IMK Candidate Window instead (will reboot the IME)";
"Use Shift Key Accommodation in all cases" = "Use Shift Key Accommodation in all cases";
"Vertical" = "Vertical";
"Warning: This page is for testing future features. \nFeatures listed here may not work as expected." = "Warning: This page is for testing future features. \nFeatures listed here may not work as expected.";
"Yale Pinyin with Numeral Intonation" = "Yale Pinyin with Numeral Intonation";

View File

@ -93,7 +93,7 @@
"Allow using Enter key to confirm associated candidate selection" = "Allow using Enter key to confirm associated candidate selection";
"Also toggle alphanumerical mode with Left-Shift" = "Also toggle alphanumerical mode with Left-Shift";
"Always use fixed listing order in candidate window" = "Always use fixed listing order in candidate window";
"An accomodation for elder computer users." = "An accomodation for elder computer users.";
"An accommodation for elder computer users." = "An accommodation for elder computer users.";
"Apple ABC (equivalent to English US)" = "Apple ABC (equivalent to English US)";
"Apple Chewing - Dachen" = "Apple Chewing - Dachen";
"Apple Chewing - Eten Traditional" = "Apple Chewing - Eten Traditional";
@ -119,6 +119,7 @@
"Choose the phonetic layout for Mandarin parser." = "Choose the phonetic layout for Mandarin parser.";
"Choose your desired user data folder path. Will be omitted if invalid." = "Choose your desired user data folder path. Will be omitted if invalid.";
"Choose your preferred layout of the candidate window." = "Choose your preferred layout of the candidate window.";
"Completely disable using Shift key to toggling alphanumerical mode" = "Completely disable using Shift key to toggling alphanumerical mode";
"Cursor Selection:" = "Cursor Selection:";
"Dachen (Microsoft Standard / Wang / 01, etc.)" = "Dachen (Microsoft Standard / Wang / 01, etc.)";
"Dachen 26 (libChewing)" = "Dachen 26 (libChewing)";
@ -164,6 +165,7 @@
"Show Hanyu-Pinyin in the inline composition buffer & tooltip" = "Show Hanyu-Pinyin in the inline composition buffer & tooltip";
"Show page buttons in candidate window" = "Show page buttons in candidate window";
"Simplified Chinese" = "Simplified Chinese";
"Some client apps (like Chromium-cored browsers: MS Edge, Google Chrome, etc.) may duplicate Shift-key inputs due to their internal bugs, and their devs are less likely to fix their bugs of such. vChewing has its accommodation procedures enabled by default for known Chromium-cored browsers. If you want the same accommodation for other client apps, please tick this checkbox on." = "Some client apps (like Chromium-cored browsers: MS Edge, Google Chrome, etc.) may duplicate Shift-key inputs due to their internal bugs, and their devs are less likely to fix their bugs of such. vChewing has its accommodation procedures enabled by default for known Chromium-cored browsers. If you want the same accommodation for other client apps, please tick this checkbox on.";
"Space to +cycle candidates, Shift+Space to +cycle pages" = "Space to +cycle candidates, Shift+Space to +cycle pages";
"Space to +cycle pages, Shift+Space to +cycle candidates" = "Space to +cycle pages, Shift+Space to +cycle candidates";
"Starlight" = "Starlight";
@ -177,6 +179,7 @@
"Use .langIdentifier to handle UI fonts in candidate window" = "Use .langIdentifier to handle UI fonts in candidate window";
"Use ESC key to clear the entire input buffer" = "Use ESC key to clear the entire input buffer";
"Use IMK Candidate Window instead (will reboot the IME)" = "Use IMK Candidate Window instead (will reboot the IME)";
"Use Shift Key Accommodation in all cases" = "Use Shift Key Accommodation in all cases";
"Vertical" = "Vertical";
"Warning: This page is for testing future features. \nFeatures listed here may not work as expected." = "Warning: This page is for testing future features. \nFeatures listed here may not work as expected.";
"Yale Pinyin with Numeral Intonation" = "Yale Pinyin with Numeral Intonation";

View File

@ -93,7 +93,7 @@
"Allow using Enter key to confirm associated candidate selection" = "Enter キーを連想語彙候補の確認のために使う";
"Also toggle alphanumerical mode with Left-Shift" = "左側の Shift キーでも英数入力モードの切り替え";
"Always use fixed listing order in candidate window" = "候補文字を固定順番で陳列する";
"An accomodation for elder computer users." = "年配なるユーザーのために提供した機能である。";
"An accommodation for elder computer users." = "年配なるユーザーのために提供した機能である。";
"Apple ABC (equivalent to English US)" = "Apple ABC (Apple U.S. キーボードと同じ)";
"Apple Chewing - Dachen" = "Apple 大千注音キーボード";
"Apple Chewing - Eten Traditional" = "Apple 倚天傳統キーボード";
@ -119,6 +119,7 @@
"Choose the phonetic layout for Mandarin parser." = "共通語分析器の注音配列をご指定ください。";
"Choose your desired user data folder path. Will be omitted if invalid." = "欲しがるユーザー辞書保存先をご指定ください。無効なる保存先設定は省かれる。";
"Choose your preferred layout of the candidate window." = "入力候補陳列の仕様をご指定ください。";
"Completely disable using Shift key to toggling alphanumerical mode" = "Shift キーの英数入力モードの切り替え機能を徹底的に禁ず";
"Cursor Selection:" = "カーソル候補呼出:";
"Dachen (Microsoft Standard / Wang / 01, etc.)" = "大千配列 (Microsoft 標準・王安・零壹など)";
"Dachen 26 (libChewing)" = "酷音大千 26 キー配列";
@ -164,6 +165,7 @@
"Show Hanyu-Pinyin in the inline composition buffer & tooltip" = "弁音合併入力(入力緩衝列とヒントで音読みを漢語弁音に)";
"Show page buttons in candidate window" = "入力候補陳列の側にページボタンを表示";
"Simplified Chinese" = "簡体中国語";
"Some client apps (like Chromium-cored browsers: MS Edge, Google Chrome, etc.) may duplicate Shift-key inputs due to their internal bugs, and their devs are less likely to fix their bugs of such. vChewing has its accommodation procedures enabled by default for known Chromium-cored browsers. If you want the same accommodation for other client apps, please tick this checkbox on." = "いくつかのアプリ(例えば MS Edge や Google Chrome などのような Chromium 系ブラウザーには「Shift キーの入力イベントを複数化してしまう」という支障があり、そしてアプリそれぞれの開発元に修復される可能性はほぼゼロだと言える。威注音入力アプリは対策用の特殊措置を普段に起用している。別のアプリにも同じ特殊措置が欲しければ、これをチェックしてください。";
"Space to +cycle candidates, Shift+Space to +cycle pages" = "Shift+Space で次のページ、Space で次の候補文字を";
"Space to +cycle pages, Shift+Space to +cycle candidates" = "Space で次のページ、Shift+Space で次の候補文字を";
"Starlight" = "星光配列";
@ -177,6 +179,7 @@
"Use .langIdentifier to handle UI fonts in candidate window" = "「.langIdentifier」を使って候補陳列ウィンドウのフォントを取り扱う";
"Use ESC key to clear the entire input buffer" = "ESC キーで入力緩衝列を消す";
"Use IMK Candidate Window instead (will reboot the IME)" = "IMK 候補陳列ウィンドウを起用(入力アプリは自動的に再起動)";
"Use Shift Key Accommodation in all cases" = "いずれの客体アプリにも Shift キーの互換性措置を起用";
"Vertical" = "縦型陳列";
"Warning: This page is for testing future features. \nFeatures listed here may not work as expected." = "警告:これからの新機能テストのために作ったページですから、\nここで陳列されている諸機能は予想通り動けるだと思わないでください。";
"Yale Pinyin with Numeral Intonation" = "イェール弁音 (ローマ字+数字音調)";

View File

@ -93,7 +93,7 @@
"Allow using Enter key to confirm associated candidate selection" = "允许使用 Enter 确认当前选中的联想词";
"Also toggle alphanumerical mode with Left-Shift" = "也允许使用左侧的 Shift 键盘切换英数输入模式";
"Always use fixed listing order in candidate window" = "以固定顺序来陈列选字窗内的候选字";
"An accomodation for elder computer users." = "针对年长使用者的习惯而提供。";
"An accommodation for elder computer users." = "针对年长使用者的习惯而提供。";
"Apple ABC (equivalent to English US)" = "Apple ABC (与 Apple 美规键盘等价)";
"Apple Chewing - Dachen" = "Apple 大千注音键盘排列";
"Apple Chewing - Eten Traditional" = "Apple 倚天传统键盘排列";
@ -119,6 +119,7 @@
"Choose the phonetic layout for Mandarin parser." = "请指定普通话/国音分析器所使用的注音排列。";
"Choose your desired user data folder path. Will be omitted if invalid." = "请在此指定您想指定的使用者语汇档案目录。无效值会被忽略。";
"Choose your preferred layout of the candidate window." = "选择您所偏好的候选字窗布局。";
"Completely disable using Shift key to toggling alphanumerical mode" = "彻底禁止使用 Shift 键切换英数模式";
"Cursor Selection:" = "选字游标:";
"Dachen (Microsoft Standard / Wang / 01, etc.)" = "大千排列 (微软标准/王安/零壹/仲鼎/国乔)";
"Dachen 26 (libChewing)" = "酷音大千二十六键排列";
@ -144,7 +145,6 @@
"Horizontal" = "横向布局";
"Hsu" = "许氏国音自然排列";
"Hualuo Pinyin with Numeral Intonation" = "华罗拼音+数字标调";
"Hualuo Pinyin with Numeral Intonation" = "華羅拼音+数字标调";
"IBM" = "IBM 排列";
"IMK candidate window is plagued with issues like failed selection keys." = "IMK 选字窗目前暂时无法正常使用选字键,并具其它未知故障。";
"in front of the phrase (like macOS built-in Zhuyin IME)" = "将游标置于词语前方 // macOS 内建注音风格";
@ -165,8 +165,9 @@
"Show Hanyu-Pinyin in the inline composition buffer & tooltip" = "拼音并击(组字区与工具提示内显示汉语拼音)";
"Show page buttons in candidate window" = "在选字窗内显示翻页按钮";
"Simplified Chinese" = "简体中文";
"Space to +cycle candidates, Shift+Space to +cycle pages" = "Shift+空格键 换下一页,空格键 换选下一个后选字";
"Space to +cycle pages, Shift+Space to +cycle candidates" = "空格键 换下一页Shift+空格键 换选下一个后选字";
"Some client apps (like Chromium-cored browsers: MS Edge, Google Chrome, etc.) may duplicate Shift-key inputs due to their internal bugs, and their devs are less likely to fix their bugs of such. vChewing has its accommodation procedures enabled by default for known Chromium-cored browsers. If you want the same accommodation for other client apps, please tick this checkbox on." = "某些应用(比如像是 MS Edge 或者 Chrome 这样的 Chromium 核心的浏览器)可能会使输入的 Shift 按键讯号被重复输入,且其有关研发方很可能不打算修复这些产品缺陷。威注音针对这些应用预设启用了相容措施。如果您希望在任何应用当中都启用该措施的话,请勾选之。";
"Space to +cycle candidates, Shift+Space to +cycle pages" = "Shift+空格键 换下一页,空格键 换选下一个候选字";
"Space to +cycle pages, Shift+Space to +cycle candidates" = "空格键 换下一页Shift+空格键 换选下一个候选字";
"Starlight" = "星光排列";
"Stop farting (when typed phonetic combination is invalid, etc.)" = "廉耻模式 // 取消勾选的话,敲错字时会有异音";
"This only works since macOS 12 with non-IMK candidate window as an alternative wordaround of Apple Bug Report #FB10978412. Apple should patch that for macOS 11 and later." = "该方法是 Apple Bug Report #FB10978412 的保守治疗方案,用来仅针对 macOS 12 开始的系统,且仅对非 IMK 选字窗起作用。Apple 应该对 macOS 11 开始的系统修复这个 Bug。";
@ -175,10 +176,10 @@
"Typing Style:" = "输入风格:";
"UI Language:" = "介面语言:";
"Universal Pinyin with Numeral Intonation" = "通用拼音+数字标调";
"Universal Pinyin with Numeral Intonation" = "通用拼音+数字标调";
"Use .langIdentifier to handle UI fonts in candidate window" = "使用 .langIdentifier 来管理选字窗的预设介面字型";
"Use ESC key to clear the entire input buffer" = "敲 ESC 键以清空整个组字缓冲区";
"Use IMK Candidate Window instead (will reboot the IME)" = "启用 IMK 选字窗(会自动重启输入法)";
"Use Shift Key Accommodation in all cases" = "对任何客体应用均启用 Shift 键相容性措施";
"Vertical" = "纵向布局";
"Warning: This page is for testing future features. \nFeatures listed here may not work as expected." = "警告:该页面仅作未来功能测试所用。\n在此列出的功能并非处于完全可用之状态。";
"Yale Pinyin with Numeral Intonation" = "耶鲁拼音+数字标调";

View File

@ -93,7 +93,7 @@
"Allow using Enter key to confirm associated candidate selection" = "允許使用 Enter 確認當前選中的聯想詞";
"Also toggle alphanumerical mode with Left-Shift" = "也允許使用左側的 Shift 鍵盤切換英數輸入模式";
"Always use fixed listing order in candidate window" = "以固定順序來陳列選字窗內的候選字";
"An accomodation for elder computer users." = "針對年長使用者的習慣而提供。";
"An accommodation for elder computer users." = "針對年長使用者的習慣而提供。";
"Apple ABC (equivalent to English US)" = "Apple ABC (與 Apple 美規鍵盤等價)";
"Apple Chewing - Dachen" = "Apple 大千注音鍵盤佈局";
"Apple Chewing - Eten Traditional" = "Apple 倚天傳統鍵盤佈局";
@ -119,6 +119,7 @@
"Choose the phonetic layout for Mandarin parser." = "請指定普通話/國音分析器所使用的注音排列。";
"Choose your desired user data folder path. Will be omitted if invalid." = "請在此指定您想指定的使用者語彙檔案目錄。無效值會被忽略。";
"Choose your preferred layout of the candidate window." = "選擇您所偏好的候選字窗佈局。";
"Completely disable using Shift key to toggling alphanumerical mode" = "徹底禁止使用 Shift 鍵切換英數模式";
"Cursor Selection:" = "選字游標:";
"Dachen (Microsoft Standard / Wang / 01, etc.)" = "大千排列 (微軟標準/王安/零壹/仲鼎/國喬)";
"Dachen 26 (libChewing)" = "酷音大千二十六鍵排列";
@ -164,8 +165,9 @@
"Show Hanyu-Pinyin in the inline composition buffer & tooltip" = "拼音並擊(組字區與工具提示內顯示漢語拼音)";
"Show page buttons in candidate window" = "在選字窗內顯示翻頁按鈕";
"Simplified Chinese" = "簡體中文";
"Space to +cycle candidates, Shift+Space to +cycle pages" = "Shift+空格鍵 換下一頁,空格鍵 換選下一個後選字";
"Space to +cycle pages, Shift+Space to +cycle candidates" = "空格鍵 換下一頁Shift+空格鍵 換選下一個後選字";
"Some client apps (like Chromium-cored browsers: MS Edge, Google Chrome, etc.) may duplicate Shift-key inputs due to their internal bugs, and their devs are less likely to fix their bugs of such. vChewing has its accommodation procedures enabled by default for known Chromium-cored browsers. If you want the same accommodation for other client apps, please tick this checkbox on." = "某些應用(比如像是 MS Edge 或者 Chrome 這樣的 Chromium 核心的瀏覽器)可能會使輸入的 Shift 按鍵訊號被重複輸入,且其有關研發方很可能不打算修復這些產品缺陷。威注音針對這些應用預設啟用了相容措施。如果您希望在任何應用當中都啟用該措施的話,請勾選之。";
"Space to +cycle candidates, Shift+Space to +cycle pages" = "Shift+空格鍵 換下一頁,空格鍵 換選下一個候選字";
"Space to +cycle pages, Shift+Space to +cycle candidates" = "空格鍵 換下一頁Shift+空格鍵 換選下一個候選字";
"Starlight" = "星光排列";
"Stop farting (when typed phonetic combination is invalid, etc.)" = "廉恥模式 // 取消勾選的話,敲錯字時會有異音";
"This only works since macOS 12 with non-IMK candidate window as an alternative wordaround of Apple Bug Report #FB10978412. Apple should patch that for macOS 11 and later." = "該方法是 Apple Bug Report #FB10978412 的保守治療方案,用來僅針對 macOS 12 開始的系統,且僅對非 IMK 選字窗起作用。Apple 應該對 macOS 11 開始的系統修復這個 Bug。";
@ -177,6 +179,7 @@
"Use .langIdentifier to handle UI fonts in candidate window" = "使用 .langIdentifier 來管理選字窗的預設介面字型";
"Use ESC key to clear the entire input buffer" = "敲 ESC 鍵以清空整個組字緩衝區";
"Use IMK Candidate Window instead (will reboot the IME)" = "啟用 IMK 選字窗(會自動重啟輸入法)";
"Use Shift Key Accommodation in all cases" = "對任何客體應用均啟用 Shift 鍵相容性措施";
"Vertical" = "縱向佈局";
"Warning: This page is for testing future features. \nFeatures listed here may not work as expected." = "警告:該頁面僅作未來功能測試所用。\n在此列出的功能並非處於完全可用之狀態。";
"Yale Pinyin with Numeral Intonation" = "耶魯拼音+數字標調";

View File

@ -3,9 +3,9 @@
<plist version="1.0">
<dict>
<key>CFBundleShortVersionString</key>
<string>1.9.2</string>
<string>1.9.3</string>
<key>CFBundleVersion</key>
<string>1992</string>
<string>1993</string>
<key>UpdateInfoEndpoint</key>
<string>https://gitee.com/vchewing/vChewing-macOS/raw/main/Update-Info.plist</string>
<key>UpdateInfoSite</key>

View File

@ -726,7 +726,7 @@
<key>USE_HFS+_COMPRESSION</key>
<false/>
<key>VERSION</key>
<string>1.9.2</string>
<string>1.9.3</string>
</dict>
<key>TYPE</key>
<integer>0</integer>

View File

@ -544,7 +544,7 @@
path = Resources;
sourceTree = "<group>";
};
5B62A33927AE7C6700A19448 /* UI */ = {
5B62A33927AE7C6700A19448 /* UIModules */ = {
isa = PBXGroup;
children = (
5B62A33E27AE7CD900A19448 /* CandidateUI */,
@ -552,7 +552,7 @@
5BA9FD0927FED9F3002DE248 /* PrefUI */,
5B62A34227AE7CD900A19448 /* TooltipUI */,
);
path = UI;
path = UIModules;
sourceTree = "<group>";
};
5B62A33A27AE7C7500A19448 /* WindowControllers */ = {
@ -792,7 +792,6 @@
5B62A30127AE732800A19448 /* 3rdParty */,
6A0D4F1215FC0EB100ABF4B3 /* Modules */,
5B62A33027AE78E500A19448 /* Resources */,
5B62A33927AE7C6700A19448 /* UI */,
5B62A33A27AE7C7500A19448 /* WindowControllers */,
5B62A33B27AE7C7F00A19448 /* WindowNIBs */,
);
@ -818,6 +817,7 @@
5B62A32427AE757300A19448 /* LangModelRelated */,
5B62A32327AE756800A19448 /* LanguageParsers */,
5B62A31E27AE74E400A19448 /* SFX */,
5B62A33927AE7C6700A19448 /* UIModules */,
);
path = Modules;
sourceTree = "<group>";
@ -1417,7 +1417,7 @@
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1992;
CURRENT_PROJECT_VERSION = 1993;
GCC_C_LANGUAGE_STANDARD = gnu11;
GCC_DYNAMIC_NO_PIC = NO;
GCC_PREPROCESSOR_DEFINITIONS = (
@ -1427,7 +1427,7 @@
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GENERATE_INFOPLIST_FILE = YES;
MARKETING_VERSION = 1.9.2;
MARKETING_VERSION = 1.9.3;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = org.atelierInmu.vChewingTests;
@ -1456,13 +1456,13 @@
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1992;
CURRENT_PROJECT_VERSION = 1993;
ENABLE_NS_ASSERTIONS = NO;
GCC_C_LANGUAGE_STANDARD = gnu11;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GENERATE_INFOPLIST_FILE = YES;
MARKETING_VERSION = 1.9.2;
MARKETING_VERSION = 1.9.3;
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = org.atelierInmu.vChewingTests;
@ -1493,7 +1493,7 @@
CODE_SIGN_IDENTITY = "-";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 1992;
CURRENT_PROJECT_VERSION = 1993;
DEAD_CODE_STRIPPING = YES;
GCC_C_LANGUAGE_STANDARD = gnu11;
GCC_DYNAMIC_NO_PIC = NO;
@ -1514,7 +1514,7 @@
"$(inherited)",
"@executable_path/../Frameworks",
);
MARKETING_VERSION = 1.9.2;
MARKETING_VERSION = 1.9.3;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = org.atelierInmu.vChewing.vChewingPhraseEditor;
@ -1543,7 +1543,7 @@
CODE_SIGN_IDENTITY = "-";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 1992;
CURRENT_PROJECT_VERSION = 1993;
DEAD_CODE_STRIPPING = YES;
ENABLE_NS_ASSERTIONS = NO;
GCC_C_LANGUAGE_STANDARD = gnu11;
@ -1560,7 +1560,7 @@
"$(inherited)",
"@executable_path/../Frameworks",
);
MARKETING_VERSION = 1.9.2;
MARKETING_VERSION = 1.9.3;
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = org.atelierInmu.vChewing.vChewingPhraseEditor;
@ -1674,7 +1674,7 @@
CODE_SIGN_IDENTITY = "-";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 1992;
CURRENT_PROJECT_VERSION = 1993;
DEAD_CODE_STRIPPING = YES;
DEVELOPMENT_ASSET_PATHS = "";
DEVELOPMENT_TEAM = "";
@ -1702,7 +1702,7 @@
"$(inherited)",
"@executable_path/../Frameworks",
);
MARKETING_VERSION = 1.9.2;
MARKETING_VERSION = 1.9.3;
ONLY_ACTIVE_ARCH = YES;
PRODUCT_BUNDLE_IDENTIFIER = org.atelierInmu.inputmethod.vChewing;
PRODUCT_NAME = "$(TARGET_NAME)";
@ -1729,7 +1729,7 @@
CODE_SIGN_IDENTITY = "-";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 1992;
CURRENT_PROJECT_VERSION = 1993;
DEAD_CODE_STRIPPING = YES;
DEVELOPMENT_ASSET_PATHS = "";
DEVELOPMENT_TEAM = "";
@ -1751,7 +1751,7 @@
"$(inherited)",
"@executable_path/../Frameworks",
);
MARKETING_VERSION = 1.9.2;
MARKETING_VERSION = 1.9.3;
PRODUCT_BUNDLE_IDENTIFIER = org.atelierInmu.inputmethod.vChewing;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
@ -1773,7 +1773,7 @@
CODE_SIGN_IDENTITY = "-";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 1992;
CURRENT_PROJECT_VERSION = 1993;
DEAD_CODE_STRIPPING = YES;
DEVELOPMENT_TEAM = "";
GCC_C_LANGUAGE_STANDARD = gnu99;
@ -1793,7 +1793,7 @@
"$(inherited)",
"@executable_path/../Frameworks",
);
MARKETING_VERSION = 1.9.2;
MARKETING_VERSION = 1.9.3;
ONLY_ACTIVE_ARCH = YES;
PRODUCT_BUNDLE_IDENTIFIER = "org.atelierInmu.vChewing.${PRODUCT_NAME:rfc1034identifier}";
PRODUCT_NAME = "$(TARGET_NAME)";
@ -1815,7 +1815,7 @@
CODE_SIGN_IDENTITY = "-";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 1992;
CURRENT_PROJECT_VERSION = 1993;
DEAD_CODE_STRIPPING = YES;
DEVELOPMENT_TEAM = "";
GCC_C_LANGUAGE_STANDARD = gnu99;
@ -1829,7 +1829,7 @@
"$(inherited)",
"@executable_path/../Frameworks",
);
MARKETING_VERSION = 1.9.2;
MARKETING_VERSION = 1.9.3;
PRODUCT_BUNDLE_IDENTIFIER = "org.atelierInmu.vChewing.${PRODUCT_NAME:rfc1034identifier}";
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";