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

Unable to input Korean on Fedora Linux + Fcitx #100

Closed
SJang1 opened this issue Oct 3, 2019 · 12 comments
Closed

Unable to input Korean on Fedora Linux + Fcitx #100

SJang1 opened this issue Oct 3, 2019 · 12 comments

Comments

@SJang1
Copy link

SJang1 commented Oct 3, 2019

I have built, and ran it.
Using Fedora 31, Fcitx as an input method.
Only able to type in English, other languages (like Korean) was impossible.
(BTW also Copy&Paste was impossible too)

Version of OpenTTD

Tried on 0.31.5 and 0.25.0

Expected result

Input Korean works

Actual result

Koeran input doesn't work. No error message.

Steps to reproduce

First of all, install fcitx fcitx-hangul and set it.

Installed packages to build

sudo dnf builddep openttd -y
dnf groupinstall "Development Tools"
dnf groupinstall "C Development Tools and Libraries"
dnf install SDL-devel allegro*
dnf install gcc gcc-c++ zlib-devel lzo-devel fontconfig-devel libicu-devel fluidsynth-devel
dnf install libxdg-basedir fluidsynth* grfcodec libtimidity-devel esound* ghc-lzma ghc-lzma*

./configure output of 0.31.5

checking awk... awk
detecting OS... UNIX
checking build system type... x86_64-redhat-linux
checking host system type... x86_64-redhat-linux
checking universal build... no
checking build cc... gcc
checking host cc... gcc
checking build c++... g++
checking host c++... g++
checking strip... disabled
checking builtin depend... yes
checking makedepend... disabled
detecting cpu-type... 64 bits
detecting SSE... found
checking static... no
checking unicode... no
using debug level... no
using desync debug level... no
using link time optimization... no
checking OSX sysroot... not OSX, skipping
checking allegro... found
checking sdl... found
checking COCOA... not OSX, skipping
checking GDI video driver... not Windows, skipping
checking dedicated... not selected
checking console application... not Windows, skipping
checking squirrel... found
checking translator... no
checking assert... enabled
checking zlib... found
checking liblzma... found
checking lzo2... found
checking Uniscribe text layout... not Windows, skipping
checking libxdg-basedir... not found
checking libpng... found
checking freetype2... found
checking fontconfig... found
checking icu-lx... not found
checking icu-i18n... found
checking fluidsynth... found
checking direct-music... not Windows, skipping
checking xaudio2... not Windows, skipping
checking sort... sort
suppress language errors... no
checking stripping... skipped
checking distcc... no (only used when forced)
checking ccache... no (only used when forced)
checking grfcodec... found
checking nforenum... found
checking OSX application bundle... not OSX, skipping
checking revision... source release version
checking iconv... not OSX, skipping
personal home directory... .openttd
shared data directory... none
installation directory... /
icon theme directory... share/icons/hicolor
manual page directory... share/man/man6
menu item directory... share/applications
checking libdl... found
checking libbfd... no
checking dbg gdb... found
checking dbg gdb (prctl)... found
checking sigaction... found
checking ucontext... found
checking sigaltstack... found
checking bitmath builtins... found
checking abi::__cxa_demangle... found
using CFLAGS_BUILD...  -Wall -Wno-multichar -Wsign-compare -Wundef -Wwrite-strings -Wpointer-arith -W -Wno-unused-parameter -Wredundant-decls -Wformat=2 -Wformat-security -Winit-self -fno-strict-aliasing -Wcast-qual -fno-strict-overflow -Wnon-virtual-dtor -Wno-free-nonheap-object -rdynamic -DUNIX -D_FORTIFY_SOURCE=2 -O1 
using CXXFLAGS_BUILD...  -flifetime-dse=1 -std=gnu++11 
using LDFLAGS_BUILD...  -rdynamic 
using CFLAGS... -O2 -fomit-frame-pointer  -DCUSTOM_ALLOCATOR -Wall -Wno-multichar -Wsign-compare -Wundef -Wwrite-strings -Wpointer-arith -W -Wno-unused-parameter -Wredundant-decls -Wformat=2 -Wformat-security -Winit-self -fno-strict-aliasing -Wcast-qual -fno-strict-overflow -Wnon-virtual-dtor -Wno-free-nonheap-object -rdynamic -DUNIX -D_FORTIFY_SOURCE=2 -DWITH_SSE -DWITH_DL -DWITH_DBG_GDB -DWITH_PRCTL_PT -g1 -DWITH_SIGACTION -DWITH_UCONTEXT -DWITH_SIGALTSTACK -DWITH_BITMATH_BUILTINS -DWITH_DEMANGLE -DWITH_ALLEGRO  -DWITH_SDL -I/usr/include/SDL  -D_REENTRANT  -DWITH_ZLIB   -DWITH_LIBLZMA   -DWITH_LZO -D_SQ64 -I/home/djraymond1/Downloads/OpenTTD-patches-jgrpp-0.31.5-1/src/3rdparty/squirrel/include -DWITH_PNG -I/usr/include/libpng16   -DWITH_FONTCONFIG -I/usr/include/freetype2 -I/usr/include/libpng16   -DWITH_FREETYPE -I/usr/include/freetype2 -I/usr/include/libpng16   -DWITH_ICU_I18N   -DFLUIDSYNTH -DWITH_PERSONAL_DIR -DPERSONAL_DIR=\\".openttd\\" -DGLOBAL_DATA_DIR=\\"/usr/local/share/games/openttd\\" 
using CXXFLAGS...  -flifetime-dse=1 -std=gnu++11 
using LDFLAGS...  -lpthread -ldl -lc -lalleg  -lSDL -lpthread  -lz   -llzma   -llzo2 -lpng16 -lz   -lfontconfig -lfreetype   -lfreetype   -licui18n -licuuc -licudata   -lfluidsynth  -rdynamic 
Generating Makefile...
Generating menu item...
Generating lang/Makefile...
Generating setting/Makefile...
Generating grf/Makefile...
Generating objs/Makefile...

and build it by make, run openttd.

@SJang1 SJang1 changed the title Unable to input Korean on Fedora Linux Unable to input Korean on Fedora Linux + Fcitx Oct 3, 2019
@JGRennison
Copy link
Owner

Looking at the code, there does not seem to be any IME support for Linux/SDL at all.
This issue appears relevant OpenTTD/OpenTTD#7296

Upstream trunk recently added SDL2 support. While this does not appear to include any IME support either it may be worth trying out to see if some text entry is possible.
I can look into it at some point but it may be a while.

@SJang1
Copy link
Author

SJang1 commented Oct 4, 2019

I have checked (with SDL2) openttd master branch, korean input did not worked ether.
Seems OpenTTD 2796 is closed, does this have to go OpenTTD issue too?

@JGRennison
Copy link
Owner

Could you try the most recent update of the jgrpp-nrt branch?
I was able to get basic IME input working here.
You may need to set the environment variable SDL_IM_MODULE=fcitx

@SJang1
Copy link
Author

SJang1 commented Oct 6, 2019

Doesn't work ether, can't type in Korean.
I have set Shift+Space and Hangul key as changing language, for Shift+Space shows up no (error) message, for Hangul key shows up this message on terminal when pressing :

The key you just pressed is not recognized by SDL. To help get this fixed, please report this to the SDL forums/mailing list <https://discourse.libsdl.org/> X11 KeyCode 130 (122), X11 KeySym 0xFF31 (Hangul).

@JGRennison
Copy link
Owner

I was able to get Hangul input working here.
Running with SDL_IM_MODULE=fcitx bin/openttd and switching modes using the "trigger input method" or "scroll between input methods" keys, or using the tray icon, seemed to work fine.
I've also pushed a fix for an IME related crash.

@SJang1
Copy link
Author

SJang1 commented Oct 6, 2019

For here now, changing key works but the input is not what I am expecting.
image
I have just tested two keys,
' was expecting ㅇ(english key is d)
\ was expecting ㅗ(englush key is h)
Like this, all keys were not expecting.

Hangul key is working, but still showing up same message at the terminal.

BTW I couldn't test with tray icon, because not showing up.

@JGRennison
Copy link
Owner

JGRennison commented Oct 7, 2019

You may need to build and install libsdl from source to make sure that IME support is included.
e.g clone: https://github.com/spurious/SDL-mirror, run ./configure making sure that fcitx and IME support are enabled, make and make install
See https://bugzilla.libsdl.org/show_bug.cgi?id=4354

Edit: Can you update to the most recent commit in the jgrpp-nrt branch and post the output when using the -Z switch.

@SJang1
Copy link
Author

SJang1 commented Oct 9, 2019

Seems still after build & make installing. I'll try building openttd after building sdl later.

@JGRennison
Copy link
Owner

Could try the most recent commit in the jgrpp-nrt branch?
You'll need to install libdbus-1-dev, libx11-dev and fcitx-libs-dev (or the equivalent for your distro) if they are not already installed.

@SJang1
Copy link
Author

SJang1 commented Oct 11, 2019

It works! I could input korean, but still can't switch with Hangul key. Shift+Space switching works.

You may need to build and install libsdl from source to make sure that IME support is included.
e.g clone: https://github.com/spurious/SDL-mirror, run ./configure making sure that fcitx and IME support are enabled, make and make install
See https://bugzilla.libsdl.org/show_bug.cgi?id=4354

Edit: Can you update to the most recent commit in the jgrpp-nrt branch and post the output when using the -Z switch.

I didn't needed this to input it.

Still getting this warning on terminal when using Hangul key+doesn't change language, maybe SDL problem?
The key you just pressed is not recognized by SDL. To help get this fixed, please report this to the SDL forums/mailing list <https://discourse.libsdl.org/> X11 KeyCode 130 (122), X11 KeySym 0xFF31 (Hangul).

or could it be possible to use Hangul key like commit before? (#100 (comment))

Hangul key is working, but still showing up same message at the terminal.

@JGRennison
Copy link
Owner

Can you try the most recent commit?

@SJang1
Copy link
Author

SJang1 commented Oct 14, 2019

Now it works!

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

2 participants