Consolidate JKHL candidate state behavior into single enum setting #565
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Replaces two boolean settings (
kUseJKtoMoveCompositorCursorInCandidateState,kUseHLtoMoveCompositorCursorInCandidateState) with a single integer enumkCandidateStateJKHLBehavioroffering three mutually exclusive behaviors:Changes
Core Settings Layer
kCandidateStateJKHLBehaviorto UserDef enum with integer dataTypefixOddPreferencesCore()to constrain values to [0,1,2]Input Handling
InputHandler_HandleCandidate.swift: Replaced boolean checks with enum comparisons:
InputSession_HandleEvent.swift: Added row-flipping key translation. When in candidate state, dynamically converts JKHL to arrow keys based on window orientation:
UI Updates
Localization
Added i18n keys for en/ja/zh-Hans/zh-Hant:
kCandidateStateJKHLBehavior.shortTitle: "JKHL key behavior in candidate window"kCandidateStateJKHLBehavior.description: Warning about auto-exclusion from candidate keys and %quick compatibilitykCandidateStateJKHLBehavior.option.{0,1,2}: Per-option descriptionsRemoved deprecated localization keys for the two boolean settings.
Technical Notes
The row-flipping logic sits in SessionProtocol (not InputHandlerProtocol) to maintain code independence and avoid structural similarities with external implementations per issue requirements.
Original prompt
UserDef.kCandidateStateJKHLBehaviorand +PrefMgrProtocol.candidateStateJKHLBehavior. #564✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.