Skip to content

Add Korean Phonetic layout - #873

Merged
srish merged 14 commits into
wikimedia:masterfrom
Mauroxe:master
Nov 25, 2026
Merged

srish merged 14 commits into
wikimedia:masterfrom
Mauroxe:master

Conversation

@Mauroxe

@Mauroxe Mauroxe commented Oct 28, 2026

Copy link
Copy Markdown
Contributor

Summary

This pull request adds phonetic keyboard for korean language.

Details

image

It's a hangul layout, no transliteration. It types hangul letters, not latin.
Doesn't use romanization. It works a lot faster.
No need to type space after each syllable.

Info: Wiki / SIL documentation - IME

Motivation

Makes korean input on wikipedia easier and faster.

Notes

Backspace fixed to work as in standard layout.

@srish srish left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Mauroxe Thanks for adding this! I tested typing in the browser.
I left a few comments. The main ones are the missing commas in the tests (which stop the test suite from running), adding the keyboard to the Korean list so it shows in the menu, and few layout related fixes.

Comment thread test/jquery.ime.test.fixtures.js Resolved
Comment thread src/jquery.ime.inputmethods.js Resolved
Comment thread rules/ko/ko-phonetic.js Resolved
Comment thread rules/ko/ko-phonetic.js Resolved
Comment thread rules/ko/ko-phonetic.js Resolved
Comment thread rules/ko/ko-phonetic.js Resolved
Comment thread rules/ko/ko-phonetic.js Resolved
@Mauroxe

Mauroxe commented Nov 4, 2026

Copy link
Copy Markdown
Contributor Author

Thanks for the review. I've redone it to address the mistakes.

@srish srish left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Mauroxe Thanks for the update! Most of my earlier comments have been addressed, and the tests are passing now. I've left a few more change requests. It would also be helpful if you could resolve the earlier threads that have already been addressed.

Comment thread test/jquery.ime.test.fixtures.js Resolved
Comment thread rules/ko/ko-phonetic.js Resolved
Comment thread rules/ko/ko-phonetic.js Resolved
Comment thread rules/ko/ko-phonetic.js Resolved

@srish srish left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @Mauroxe! Most earlier comments are addressed and the tests pass. I left one comment about the Backspace handler causing errors in contenteditable editors.

Comment thread rules/ko/ko-phonetic.js Resolved

@srish srish left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @Mauroxe. I tested the latest version and noticed a few things. I might be missing something, so please correct me if so:

  • Lint: the tests pass, but npx eslint rules/ko/ko-phonetic.js still shows some errors, mostly from selection, range and textNode being declared twice in the beforeinput handler, plus a few trailing spaces (lines 15, 108 and 111). Could you fix these?
  • Backspace: in Chrome without the handler, Backspace after 가 deleted the whole syllable and I didn't see ᄀ. Which browser and OS did you see it in? With the handler, I also noticed that Cmd+Z after Backspace didn't work in a contenteditable box in Chrome and Safari.
  • Shift keys: Shift + a letter (ㅃ, ㄸ, ㄲ) shows an error in the browser console (rule.slice is not a function). This seems to be a bug in the main code (src/jquery.ime.js, around line 176), not in this PR. These keys still work because the insertText part of the beforeinput handler fixes the letter afterwards. When I removed the handler, qoBa gave 오Bㅏ instead of 오빠.

Since the other keyboards here don't change Backspace, would it be possible to remove just the Backspace part (deleteContentBackward) from the beforeinput handler, and keep the insertText part for now so the Shift keys keep working?

@srish
srish merged commit 2bcd1a4 into wikimedia:master Nov 25, 2026
2 checks passed
@srish

srish commented Nov 25, 2026

Copy link
Copy Markdown
Member

Thanks a lot @Mauroxe for making all the suggested improvements and for this contribution!

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

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants