tadeokondrak / anthywl

Japanese input method for Sway using libanthy
ISC License
30 stars 1 forks source link

b2473f7a747 (custom keymap) randomly breaks #28

Open kchibisov opened 8 months ago

kchibisov commented 8 months ago

I'm pretty sure that the issue is likely lies within the https://github.com/YaLTeR/niri or smithay's IME input handling, however once I revert this commit everything goes back to normal.

In particular, I've noticed that:

  1. Sometimes keymap is printed into stdout and at this point all input breaks entirely, like I can trigger IME, but I can't type regular input that is forwarded with virtual keyboard anymore.
  2. text_input.enable()/text_input.disable() also kind of breaks for whatever reason (probably bug in smithay), easy to repro in alacritty with its vi mode since it tries to disable.

My xkb config is just

        xkb {
            layout "us(dvorak),ru"
            options "caps:escape,compose:ralt"
        }

I haven't found a pattern what exactly causes the 1, however 2 could be easier reproduced in alacritty+niri and it goes away once I revert said commit.

tadeokondrak commented 8 months ago

Thanks for the report! I'll try that out (been meaning to try out niri anyway)

Sometimes keymap is printed into stdout and at this point all input breaks entirely, like I can trigger IME, but I can't type regular input that is forwarded with virtual keyboard anymore.

Just to make sure: Do you have an enable/disable keybind set in anthywl (default Ctrl+Shift+Backspace) and does toggling anthywl off make things go back to normal?

Popups probably don't work in the new mode that supports clients that don't use text_input, so the IME might be working but not providing any feedback.

kchibisov commented 8 months ago

does toggling anthywl off make things go back to normal?

I can't make it go back to normal until I pkill anthywl(it goes back immediately after that) I can't toggle it off, no, the input seems kind of dead in normal mode(running, but no IME one), however IME itself works(IME compose mode after pressing enable).

Popups probably don't work in the new mode that supports clients that don't use text_input, so the IME might be working but not providing any feedback.

Hm, maybe it has something to do with QT app I was running(anki), however it was not in focus and I can trigger 2 in alacritty, but it could be a smithay bug.

That's my entire config.

global-bindings {
    Mod4+grave toggle
}

composing-bindings {
    space select
    Return accept
    Escape discard
    Backspace delete-left
    Left move-left
    Right move-right
}

selecting-bindings {
    Escape discard
    Return accept
    BackSpace delete-left
    Left move-left
    Right move-right
    Shift+Left expand-left
    Shift+Right expand-right
    Up prev-candidate
    Down next-candidate
    space cycle-candidate
}
tadeokondrak commented 8 months ago

Haven't looked at issue 2 yet, but I can reproduce issue 1 in niri but not in sway.

kchibisov commented 8 months ago

If you can point me in the direction of what is broken I can look on the other side. Since if it breaks that way it's likely some invariant is broken on the anthywl, so knowing what it is could help fixing it upstream in smithay.