Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IME not supported on linux #1497

Closed
scarf005 opened this issue Apr 29, 2022 · 7 comments
Closed

IME not supported on linux #1497

scarf005 opened this issue Apr 29, 2022 · 7 comments

Comments

@scarf005
Copy link
Member

Describe the bug

korean input is mashed up on linux ubuntu, when using ibus' korean input method 한국어 - Hangul.

Steps To Reproduce

  1. everything involving typing in korean locale is affected, for example setting up name for world map
  2. below is an attempt to write 안녕 세상 (or dkssud tptkd if the keyboard was set to english)
  3. the result does not match with keyboard input.

Expected behavior

  1. korean input is processed normally.
  2. for the above case, it should have been 안녕 세상, not ㅌㅁㄹㅌ.
  3. the bug might be related with ibus preferences or linux system locale.

Screenshots

image

Versions and configuration

  • OS: Linux
    • OS Version: Distributor ID: Ubuntu; Description: Ubuntu 21.10; Release: 21.10; Codename: impish;
  • Game Version: 2f16bde [64-bit]
  • Graphics Version: Tiles
  • Game Language: 한국어 [ko_KR]
  • Mods loaded: [
    밝은 밤 [dda],
    NPC 욕구 제거 [no_npc_food],
    영양수치 단순화 [novitamins],
    고가 다리 [elevated_bridges]
    ]

Additional context

System Locale:

❯ echo $LANG
ko_KR.UTF-8

Ibus Configuration:
image
한국어 - Hangul

keyboard configuraton:

❯ setxkbmap -query
rules:      evdev
model:      pc101
layout:     kr
variant:    kr104
options:    caps:escape
@scarf005 scarf005 changed the title buggy korean keyboard input Buggy korean keyboard input with ibus Apr 30, 2022
@scarf005
Copy link
Member Author

scarf005 commented May 7, 2022

Additional Video addressing the issue

2022-05-07_14-04-29.mp4

@scarf005
Copy link
Member Author

scarf005 commented May 7, 2022

found out it was because ime.cpp simply does not support architectures other than windows/android.

@scarf005 scarf005 changed the title Buggy korean keyboard input with ibus IME not supported on linux May 7, 2022
@olanti-p
Copy link
Contributor

olanti-p commented May 7, 2022

Porting CleverRaven/Cataclysm-DDA#41866 and related PRs would probably solve this. I didn't look deep into it, but it seems to be re-implementing IME support in a platform-independent way provided by SDL rather than the currently used method of directly interfacing with windows input manager.

@scarf005
Copy link
Member Author

scarf005 commented May 9, 2022

CleverRaven/Cataclysm-DDA#41866

cherry-picked related commits on https://github.com/scarf005/cataclysm-bn/tree/ime-migration. however still could not type korean, so downloaded cdda 0.F for linux and tested. looks like the pr did not address IME for linux... Thanks for help nevertheless, could learn cherry-picking and SDL more.

@scarf005
Copy link
Member Author

scarf005 commented May 9, 2022

Solution

  • compile SDL from source (2.0.22 as of the time this is written)
  • compile Cataclysm-BN/upload branch from source
❯ sdl2-config --version
2.0.22

The solution does not require any changes in codebase, however it requires to download and compile SDL. changes to build system (i.e makefile/cmake/vcpkg) would be needed. Since they'd be better as a separate issue, closing this.

@scarf005 scarf005 closed this as completed May 9, 2022
@Coolthulhu
Copy link
Member

Having binaries of specific libraries compiled just for one repo is not that uncommon.
If you (or someone else) could provide and host them on github and swapping them in would be as simple as changing the path used to get sdl, it would be OK to do it this way.

Not all systems need to have it done at once. It's fine if, at least at first, IME only works if the specific package of libraries is used, but defaults to the standard ones, which don't support IME. As long as it's clearly stated in docs.

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

No branches or pull requests

3 participants