-
-
Notifications
You must be signed in to change notification settings - Fork 987
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
kitten for IME input #469
Comments
That doesn't help if you need multilingual input. Any timeline on a solution for this.? |
Sure it does, it works with any language or combination of languages. As for a timeline, it will be done when it is done, if you want it to come faster, feel free to contribute. |
I don't believe it will work for Chinese since there are several hundred characters that would need to be input in a normal document. Perhaps I am misunderstanding your proposal for a work around though. Also, my use case may be special since I write in the terminal with nvim and then convert to PDF. I wish I could contribute but I don't think my programming skill are there yet. Thanks for the extremely helpful reply though. Looks like a nice project, I will check back later. |
Isn't that the whole plan? LibreIME has a pinyin dataset that can be used to map pinyin to characters. |
The problem with GLFW's solution is that it does not actually work. It causes crashes/hangs and depends on the proper functioning of whatever IME system happens to be installed by the OS, which especially on linux is a total crapshoot. |
Alright, then. I actually think providing the option to use the OS's IME system isn't necessarily a bad idea; many people like me already have IBus or something set up to their liking, and it would prevent the need for a separate keyboard shortcut. But if that would require code for integration with each IME then I suppose it's not worth it. |
On Sun, Jun 03, 2018 at 10:13:26PM -0700, Ian Huang wrote:
Perhaps kitty can provide its own IME overriding the normal system shortcut, like how ctrl+alt+u doesn't use the OS unicode input.
That is precisely what this issue is about.
|
Why is GLFW even used? SDL2 has had integration with the system IME for years. |
I looked into this and it looks like on Linux, ibus has become the de-facto standard IME system. So it makes sense to add support for it to GLFW. I have done that in the ibus branch. Note that this required fairly major surgery on GLFW (essentially rewriting its event loop to integrate dbus into it), so it is possible that some things might be broken. Please test.
In order to test it, build the ibus branch and (with ibus running) start kitty as
You should see debug output about conencting to the IBUS daemon and iME input via ibus should work. |
And I also implemented display of the typed text while the IME is in progress. |
Will fcitx be supported in kitty ? (not working for me, using ibus branch and |
No, I'm afraid I dont have the time/interest to support multiple IME systems. You are welcome to write a fcitx backed for glfw based on my ibus one, it should be easy now that I have done the hard work. |
hope someone will write a patch for fcitx. I think it is more stable than ibus, at least for Chinese. |
1 similar comment
hope someone will write a patch for fcitx. I think it is more stable than ibus, at least for Chinese. |
|
Just a heads up: for the next kitty release
to re-enable it. This is because there have been lots of bug reports about ibus causing keyboard latency/dropped keys. Given that one of kitty's primary goals is reducing input latency, I have decided to turn IME off by default. Apologies for any inconvenience. |
Just to provide some motivation for better IME support. I tried migrating from another terminal emulator and just noticed this issue - I cannot type Chinese with fcitx in a kitty window. |
Me too, I found that kitty's response is faster than others(sakura / alacritty). |
Unfortunately, ibus does not work with sway yet. =( |
|
But running in GLFW_IM_MODULE=fcitx instead of ibus doesn't works for me. |
Sorry about that. It doesn't work for me neither. I did not check the env carefully. |
GLFW_IM_MODULE=ibus + Fcitx 5 would work. Fcitx5 is able to simulate ibus api. |
just tested with: export IMSETTINGS_MODULE=fcitx5 Does not work with kitty =( |
fcitx does not support the wayland text input method. kitty uses that, |
I apologize for necroing this thread, but how to enable IME support? When run as in this screenshot: https://user-images.githubusercontent.com/41060790/110936258-91747580-836b-11eb-9dcd-88ca502ea875.png, it works, but putting |
@ManInTheSuit You need to pass the environment variable to |
Seeing |
Ok solved, I launch kitty like this now: |
When you want to set an environment variable for a command, you can use |
Thanks, that works! |
I did not find a way to pass the GLFW_IM_MODULE to gsetting default x-terminal-emulator . tried to run
and make it a shell script as: |
I also have Also, on the off chance that you are having troubles with gnome-terminal, I got my kitty to run system-wide with answer from Doron Behar here: https://askubuntu.com/questions/111592/how-do-i-set-the-default-gnome-terminal |
I started bug #5033 to hopefully expand |
Well, #5033 was closed, but I have a new workaround for the issues I explained above. If you use KDE, run I verified that even if you add Kitty's icon to your desktop, the change is preserved: If you have an important .desktop file for Kitty already that is not a mere link to |
Related: Ubuntu bug №1970928. |
Well this worked when i click to icon or launch kitty from terminal, if i open it with shortcut Super+T, it didn't |
You can edit kitty.desktop to instruct kitty to launch with GLFW_IM_MODULE=ibus. Below are installation instuctions from kitty's website. After that, edit ~/.local/share/applications/kitty.desktop to add env variable in Exec line. It looks like following after that: Done. BTW, you can also customize icon in this way. |
You can add the Fcitx5 configuration in /etc/environment:
This way, you will be able to type in Chinese every time you start kitty. |
IME does not work with kitty thanks to limitations of GLFW (glfw/glfw#41). Rather than trying to write code to interface with the IME platforms of every OS (not to mention the dozens of different IME systems in linux/windows), it might be nicer to create a kitten that implements a standard cross-platform IME interface optimized for usage with the keyboard.
Can use the data from the librime project, see https://github.com/rime/plum
Has a couple of pinyin datasets and also nice symbol definitions for entering commonly used unicode symbols. People can contribute other datasets as needed.
The other alternative is to interface with ibus via it's dbus interface, see for example: https://fossies.org/linux/SDL2/src/core/linux/SDL_ibus.c
https://github.com/qt/qtbase/tree/5.11/src/plugins/platforminputcontexts/ibus
This is what most toolkits do on linux, as evidenced by the links above.
The text was updated successfully, but these errors were encountered: