feat: Add sequential Hangul input with number row and custom layouts#1275
feat: Add sequential Hangul input with number row and custom layouts#1275codeg-old wants to merge 11 commits into
Conversation
- Replace composing text with immediate NFC syllable output - Remove FLAG_LATCH from Hangul keys to enable direct key_up - Add CandidatesView auto-hide when 'No dictionary installed' - Add number row to Korean layout with ISO punctuation placement - Add custom Korean (Dubeolsik+) and English (QWERTY Custom) layouts
72768af to
d2d9f4e
Compare
Refs: ISS-3413
Refs: ISS-3413
Refs: ISS-3413
Refs: ISS-3413
|
No issues found. Checked for bugs and AGENTS.md/PRINCIPLES.md compliance.\n\nVerification evidence: HangulInputTest and assembleDebug passed with OpenJDK 17; moto_g77 and gltab device input QA showed 적극적 and 하면 correctly.\n\n🤖 Generated with OpenCode |
|
I agree and would like to emphasize that currently (2.0.4), Korean typing is fundamentally unusable in practice. This looks like a more straightforward approach. So hopefully this could be quickly resolved in the next update. A minor point for the UI Improvements: adding a dedicated number row can be found in the options settings so unsure if necessary. (Also, I am not sure if this is part of your solution, but if not consider perhaps adding ㅐ->ㅒ and ㅔ->ㅖ for swiping O and P keys (and ㅃㅉㄸㄲㅆ for QWERT keys) in addition to the shift/capitalization method. Thank you and I look forward to this being rolled out soon, so I can use this keyboard for Korean typing. |
Julow
left a comment
There was a problem hiding this comment.
Sorry for the slow reply!
I think this makes the code too complex and I'm trying to come up with ideas. I don't have the time to do a full review for the next few weeks.
I don't like the complexity you added in KeyEventHandler. This class is modified often and with this PR, it becomes spaghetti.
I attempted this in the past in this PR: https://github.com/Julow/Unexpected-Keyboard/pull/594/changes, perhaps you can take inspiration from it ?
It doesn't actually implement Hangul composition (the call to Normalizer2 should be replaced by your code) but implements the composing text (the experience you want).
It's very old so it might require some work to be merged into the current code.
|
I tested this PR and it works well overall. A few things I noticed:
|
There was a problem hiding this comment.
One more thing I noticed: apply_hangul_shift() in KeyModifier.java appears to handle shifted jamo (e.g. ㅒ, ㅖ, double consonants) inline, but the existing codebase defines shift behaviour in srcs/compose/shift.json and compiles it into ComposeKeyData.java via compile.py. Would it make sense to follow that convention here as well?
Move the inline apply_hangul_shift() double-consonant and iotized-vowel mappings into srcs/compose/shift.json, following the existing shift convention (compiled into ComposeKeyData via compile.py). ComposeKey.apply now routes Hangul_initial/Hangul_medial keys through their string form so the shift compose data applies to them. Refs: PR Julow#1275 review
|
@chlwnsgud7 Good catch — you're right that shift behaviour belongs in Changes:
Verification: 🤖 Generated with OpenCode |
Summary
This PR adds proper Korean (Hangul) support to Unexpected Keyboard with the following features:
Korean Input
UI Improvements
New Layouts
hang_dubeolsik_custom.xml): Korean layout with number row and optimized swipe keyslatn_qwerty_custom.xml): English layout matching the Korean structureChanges
KeyEventHandler.java: Complete rewrite of Hangul handling logicKeyValue.java: Hangul keys no longer use FLAG_LATCHKeyModifier.java: Removed Hangul combine logicCandidatesView.java: Added update_visibility() for auto-hidingsrcs/layouts/