Skip to content

Add opt-in Windows Korean hardware keyboard support - #102

Draft
zeberity123 wants to merge 1 commit into
NearFrame:mainfrom
zeberity123:upstream/korean-keyboard
Draft

zeberity123 wants to merge 1 commit into
NearFrame:mainfrom
zeberity123:upstream/korean-keyboard

Conversation

@zeberity123

@zeberity123 zeberity123 commented Sep 25, 2026 •

Copy link
Copy Markdown

An SDIC Korea LTBK21 connected to an iPad did not reliably toggle the Windows host's Korean IME. Translating the language shortcut to Right Alt enabled switching, but keeping its accompanying Ctrl held until the keyboard's delayed key-up could affect subsequent typing.

This adds Windows Korean Keyboard, off by default, under Settings > Keyboard. When enabled, it uses GameController physical keyboard events with a UIKit fallback and translates Hangul/LANG1, Right Alt, Ctrl+Space, and Shift+Space into a single Right Alt tap. Hardware language shortcuts release accompanying modifiers immediately. Consumed modifiers remain released until physical key-up, and stale UIKit flags cannot turn the next ordinary Space into another language toggle.

It also provides a touch 한/영 button and an optional backtick mapping, off by default. Users should select Korean Microsoft IME with Korean keyboard (101-key) Type 1 on Windows. Korean mode repurposes Right Alt and overrides Option-as-Command; disabling it preserves the existing input path.

Validation:

  • Keyboard regression tests passed, covering delayed modifier releases, stale UIKit flags, repeat suppression, ordinary shortcuts, and reset/cancellation.
  • The existing Xcode archive and IPA packaging workflow passed.
  • Device testing (on the pre-2.0 build; retest on 2.0 pending) on iPad Pro 11-inch (3rd generation), iPadOS 18.7.8, LTBK21, and Windows 11 confirmed language switching, immediate typing after 한/영, normal Ctrl+C/V, and mixed hardware/on-screen keyboard use. This was tested in the personal build sharing the same routing implementation; the additional UIKit stale-flag fix is covered by automated regression tests.

The existing release workflow, bundle identifier, and download links are unchanged. The Caps Lock Esc/F-key mapping is kept in a separate follow-up.

The UIKit text-duplication guard uses a 150 ms window after physical keyboard events. The reported mixed-keyboard test passed, but this is not a claim of compatibility with every keyboard or iPadOS input source.

@SandiyosDev

Copy link
Copy Markdown
Collaborator

I'm open to merging after openparsec v2, meanwhile, is this PR reading for merge?

@SandiyosDev

Copy link
Copy Markdown
Collaborator

@zeberity123 thanks for the code, but this draft at the moment conflcts with main, and 2.0 will change how settings are stored and a lot of ParsecViewController
please wait for 2.0 to land before continuing

@SandiyosDev

Copy link
Copy Markdown
Collaborator

@zeberity123 2.0.0 is out, please rebase and mark your PR ready when you want a review

Adds Windows Korean Keyboard under Settings > Keyboard, off by default.
When enabled, physical keys are read through GameController (UIKit
fallback) and Hangul/LANG1, Right Alt, Ctrl+Space and Shift+Space are
translated into a single Right Alt tap for Korean Microsoft IME.
Accompanying modifiers are released immediately and ignored until their
physical key-up. Also adds a touch 한/영 button and an optional backtick
mapping.

Rebased onto 2.0.0: settings live in SettingsStore, and the mode is
re-applied when in-stream settings close, so no reconnect is needed.
Router event sequences are covered by Tests/main.swift.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@zeberity123
zeberity123 force-pushed the upstream/korean-keyboard branch from 9ed2295 to db020b5 Compare November 18, 2026 06:40
@zeberity123

Copy link
Copy Markdown
Author

Thanks for the heads-up, and sorry for the slow reply! I've rebased onto 2.0.0 as a single commit. The settings now use SettingsStore, the toggle is under Settings > Keyboard, and it's re-applied when in-stream settings close, so changing it no longer needs a reconnect. The routing logic and its tests are unchanged.

I'm keeping this as a draft until I've retested the 2.0 build on my iPad (LTBK21 → Windows 11). I'll mark it ready for review after that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants