Skip to content

Window: no input-method (IME) support, so Korean, Japanese and Chinese text cannot be typed #1022

Closed

Description

@heeseon87

What you did

Switched the macOS input source to Korean (2-Set) and typed ㅎ ㅏ ㄴ into a Bend window, expecting 한.

What happened

The program gets one Key event per physical key and nothing else.
The input method never composes the jamo, so the syllable 한 never reaches the program.

  • macOS: BendView receives keyDown: directly and does not adopt NSTextInputClient or call interpretKeyEvents:,
    so the text input system never sees the keys.
  • Linux: window_frame.c uses XLookupString. It has no XIM/XIC and no Xutf8LookupString.

This blocks any program whose users write in a language that needs an input method.

What would help

Two events next to Key:

On macOS: adopt NSTextInputClient in BendView, call [self interpretKeyEvents:@[ev]] from keyDown:, send Text from insertText:replacementRange: and Compose from setMarkedText:selectedRange:replacementRange:.
firstRectForCharacterRange: needs a caret position, which could be set with a small Window.set_caret(x, y) effect so the candidate window appears in the right place.
On Linux: open an XIM, create an XIC, and use Xutf8LookupString.

Seen on Bend 2.0.5, macOS. The same code is still on main (6a77e12, v2.0.26); links point there. The Linux path was read from the source, not run.

Activity

  1. added
    later
    on Sep 27, 2026
  2. Lorenzobattistela commented on Oct 16, 2026

    @Lorenzobattistela
    Collaborator

    Fixed by #1441 (on main, ships in the next release). On macOS BendView now adopts NSTextInputClient and calls interpretKeyEvents:, and on Linux it uses XIM/XIC with Xutf8LookupString. Committed text, so 한 from ㅎ ㅏ ㄴ, reaches the program as a Text{text} event. The in-progress composition (your proposed Compose event and Window.set_caret) isn't covered yet. Feel free to open a separate issue if you need it. Thanks @heeseon87!

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    later

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions