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

Support inline "input method" input #1613

Closed
crocket opened this issue Oct 1, 2018 · 29 comments · Fixed by #6265
Closed

Support inline "input method" input #1613

crocket opened this issue Oct 1, 2018 · 29 comments · Fixed by #6265

Comments

@crocket
Copy link

crocket commented Oct 1, 2018

Which operating system does the issue occur on? Gentoo Linux
If on linux, are you using X11 or Wayland? X11

On alacritty

2018-10-01_mon_23 53 52

On termite

2018-10-01_mon_23 58 54

Out-of-band input method input is disorienting.

@crocket
Copy link
Author

crocket commented Oct 24, 2018

Is there a way to solve this issue without incorporating gtk or qt?

Does XIM support inline input?

@chrisduerr
Copy link
Member

It is possible to solve this without gtk or qt, there's no reason why this would be necessary.

However making these changes inline is complicated, since Alacritty doesn't handle this directly and there's no logic to support it at all.

@pickfire
Copy link

Alacritty seemed to support over-the-spot IME, is there any reason why over-the-spot preedit area is not good enough to cover usage like on-the-spot preedit area?

2020-05-19-225603_1366x768_scrot

It seemed to be common to have over-the-spot preedit area in X11, I never used on-the-spot preedit area. Maybe it performs better for chinese input rather than japanese input.

@AitBits
Copy link

AitBits commented Jun 25, 2020

This would be a nice QoL addition to CJK users, because over-the-spot preedit often feels rather clunky, since you have to consciously switch focus up and down.

@pickfire
Copy link

@AitBits No, I never had to do that. I never looked at the place where we edit, I just look at the preedit area, maybe japanese is different since one seemed to be able to insert a few characters at a time, for chinese most of time I insert small words since it cannot insert character one by one.

@AitBits
Copy link

AitBits commented Jun 25, 2020

@pickfire I'm a korean user, so don't really know how it works out for japanese usage. It seems like it's a matter of preference here looking at two diverging opinions.

For typing korean words, on-the-spot method has been de-facto standard for decades and over-the-spot preedit feels really distracting.

But usually I never type any korean words in terminal so this is a trivial matter for me, though there are definitely other cases involving heavy korean usage.

@keichi
Copy link

keichi commented Jul 13, 2020

On-the-spot edit has been the default on Japanese environments too. Alacritty seems really nice but I am unable to switch from iTerm2 because it lacks inline edit.

Alacritty
alacritty

iTerm2
iterm2

@crocket
Copy link
Author

crocket commented Sep 18, 2021

Inline input method is ideal, but I'd be happy with wayland input method support.

Right now, alacritty doesn't support wayland input method standards.

X11 is insecure and harms privacy.

@kchibisov
Copy link
Member

alacritty has support for text-input-v3 and last time it worked on gnome just fine.

@crocket
Copy link
Author

crocket commented Sep 18, 2021

Fcitx5 doesn't work on alacritty with wayland backend. I'm on sway with wlroots.

@kchibisov
Copy link
Member

Does fcitx5 setup to use Wayland backend and not a dbus? I know that it should work, but last time sway/fcitx has popup window problems.

@crocket
Copy link
Author

crocket commented Sep 18, 2021

After testing, I confirmed that disabling classic user interface in fcitx5 enables input method on wayland alacritty.

However, if I disable classic user interface, input method is extremely buggy on alacritty.
Fcitx5 wayland backend has too many bugs to be useable in any way.

According to https://fcitx-im.org/wiki/Todo-List

wayland support is in progress. We still have to wait.

kchibisov added a commit to kchibisov/alacritty that referenced this issue Jan 18, 2022
This commit adds support for inline IME handling. It also makes search
bar draw proper Underline cursor instead of using '_' character.

Fixes alacritty#1613.
kchibisov added a commit to kchibisov/alacritty that referenced this issue Jan 18, 2022
This commit adds support for inline IME handling. It also makes search
bar draw proper Underline cursor instead of using '_' character.

Fixes alacritty#1613.
kchibisov added a commit to kchibisov/alacritty that referenced this issue Jan 18, 2022
This commit adds support for inline IME handling. It also makes search
bar draw proper Underline cursor instead of using '_' character.

Fixes alacritty#1613.
kchibisov added a commit to kchibisov/alacritty that referenced this issue Jan 18, 2022
This commit adds support for inline IME handling. It also makes search
bar draw proper Underline cursor instead of using '_' character.

Fixes alacritty#1613.
@kchibisov
Copy link
Member

If someone could test inline input method implemented in #5790 that will be nice, though only X11 and Wayland are supported.

@kchibisov kchibisov self-assigned this Jan 18, 2022
@KeenS
Copy link

KeenS commented Jan 18, 2022

Thank you @kchibisov for tackling this problem. I tried it on Ubuntu 21.10 on Xorg with uim-skk. While inline candidates displayed in inline, box candidates are displayed below the window.
image
2022-01-18 14 57 13

@kchibisov
Copy link
Member

@KeenS does master has the same issue? I can't test X11 now, but I can say that on Wayland they aligned properly.

kchibisov added a commit to kchibisov/alacritty that referenced this issue Jun 13, 2022
This commit adds support for inline IME handling. It also makes search
bar draw proper Underline cursor instead of using '_' character.

Fixes alacritty#1613.
kchibisov added a commit to kchibisov/alacritty that referenced this issue Jun 20, 2022
This commit adds support for inline IME handling. It also makes search
bar draw proper Underline cursor instead of using '_' character.

Fixes alacritty#1613.
kchibisov added a commit to kchibisov/alacritty that referenced this issue Jun 20, 2022
This commit adds support for inline IME handling. It also makes search
bar draw proper Underline cursor instead of using '_' character.

Fixes alacritty#1613.
kchibisov added a commit to kchibisov/alacritty that referenced this issue Jun 29, 2022
This commit adds support for inline IME handling. It also makes search
bar draw proper Underline cursor instead of using '_' character.

Fixes alacritty#1613.
kchibisov added a commit to kchibisov/alacritty that referenced this issue Jul 1, 2022
This commit adds support for inline IME handling. It also makes search
bar draw proper Underline cursor instead of using '_' character.

Fixes alacritty#1613.
kchibisov added a commit to kchibisov/alacritty that referenced this issue Jul 2, 2022
This commit adds support for inline IME handling. It also makes search
bar draw proper Underline cursor instead of using '_' character.

Fixes alacritty#1613.
kchibisov added a commit to kchibisov/alacritty that referenced this issue Jul 10, 2022
This commit adds support for inline IME handling. It also makes search
bar draw proper Underline cursor instead of using '_' character.

Fixes alacritty#1613.
kchibisov added a commit to kchibisov/alacritty that referenced this issue Jul 10, 2022
This commit adds support for inline IME handling. It also makes search
bar draw proper Underline cursor instead of using '_' character.

Fixes alacritty#1613.
kchibisov added a commit to kchibisov/alacritty that referenced this issue Jul 12, 2022
This commit adds support for inline IME handling. It also makes search
bar draw proper Underline cursor instead of using '_' character.

Fixes alacritty#1613.
donovanglover added a commit to donovanglover/nix-config that referenced this issue Aug 1, 2022
Although alacritty is an amazing terminal emulator, I am not interested
in maintaining configuration files for it at this time.

The current config works and is an excellent replica of the current
kitty config. If you have a desire to use alacritty, you can use the
files in this commit to get amazing support for things like pywal.

The reason alacritty is being removed is because it doesn't fully
support fcitx. Currently "inline input" doesn't work in Xorg, and it's
impossible to see input under GNOME Wayland.

For simplicity, only the terminal emulator that works the best for me
will be officially supported, since I've never had a reason to use
alacritty anyway.

Source: alacritty/alacritty#1613
kchibisov added a commit to kchibisov/alacritty that referenced this issue Aug 15, 2022
This commit adds support for inline IME handling. It also makes the
search bar use underline cursor instead of using '_' character.

Fixes alacritty#1613.
kchibisov added a commit to kchibisov/alacritty that referenced this issue Aug 15, 2022
This commit adds support for inline IME handling. It also makes the
search bar use underline cursor instead of using '_' character.

Fixes alacritty#1613.
kchibisov added a commit to kchibisov/alacritty that referenced this issue Aug 25, 2022
This commit adds support for inline IME handling. It also makes the
search bar use underline cursor instead of using '_' character.

Fixes alacritty#1613.
kchibisov added a commit to kchibisov/alacritty that referenced this issue Aug 25, 2022
This commit adds support for inline IME handling. It also makes the
search bar use underline cursor instead of using '_' character.

Fixes alacritty#1613.
kchibisov added a commit to kchibisov/alacritty that referenced this issue Aug 28, 2022
This commit adds support for inline IME handling. It also makes the
search bar use underline cursor instead of using '_' character.

Fixes alacritty#1613.
kchibisov added a commit that referenced this issue Aug 29, 2022
This commit adds support for inline IME handling. It also makes the
search bar use underline cursor instead of using '_' character.

Fixes #1613.
@llc0930
Copy link

llc0930 commented Aug 29, 2022

CJK users, the patch doesn't seem to work?
2022-08-30-00:55:02

$fcitx5 -v
5.0.18

WM:dwm
cargo build with only X11 support

# Force support for only X11
cargo build --release --no-default-features --features=x11

@kchibisov
Copy link
Member

Do you have inline preedit or you just have that popup at the bottom of the screen all the time. Could you provide the --print-events log if you don't have inline editing?

@llc0930
Copy link

llc0930 commented Aug 29, 2022

I have set up inline preedit in program globally.
2022-08-30-04:43:04

If I cancel it.
2022-08-30-04:43:59
2022-08-30-04:44:13

Here is the log when inline is set up, with --print-events :
Alacritty-55981.log

And this one without inline editing:
Alacritty-57469.log

@kchibisov
Copy link
Member

It seems like your IME provide its own inline input and given that we Xlib doesn't support popup positioning you have it that way. Could you setup your IME to operate normally with preedit so it won't try to draw preedit and basically forward events to alacritty? The issue is that your IME does its own inline preedit, so it's not really inline preedit in the application.

The behavior you're seeing is sort of expected on X11 given that Xlib doesn't support ime popup positioning when preedit is being used and we can't move away from Xlib for now...

@llc0930
Copy link

llc0930 commented Aug 31, 2022

It works now, thanks all.
2022-08-31-17:41:02-s

@pickfire
Copy link

@lolicon0930 I guess it's a bug from fcitx5?

@kchibisov
Copy link
Member

It was a combination of us doing weird, but valid thing and fcitx not thinking that it's possible and not throwing an error here. In general we'll do what fcitx author suggested, but it's sort of late to fix it for the next release, since it's in winit and would require breaking release already.

@kchibisov
Copy link
Member

But yeah, the most recent fcitx has a fix for that as well.

jason5122 pushed a commit to jason5122/alacritty that referenced this issue Sep 2, 2022
This commit adds support for inline IME handling. It also makes the
search bar use underline cursor instead of using '_' character.

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