Skip to content

Use ei_text in the type-text example - #28

Merged
ids1024 merged 1 commit into
ids1024:masterfrom
lamco-admin:type-text-ei-text
Jun 16, 2026
Merged

Use ei_text in the type-text example#28
ids1024 merged 1 commit into
ids1024:masterfrom
lamco-admin:type-text-ei-text

Conversation

@glamberson

Copy link
Copy Markdown
Contributor

The type-text example reverse-mapped each character to a keycode and shift level through an xkb keymap and replayed synthetic key presses. The ei_text interface (libei 1.6.0) takes a UTF-8 string directly, so this binds ei_text and sends the string in one text.utf8(...) call.

It also drops the keymap handling, the keymap state, and the now-unused xkbcommon dev-dependency. The seat reports when the server does not advertise ei_text instead of panicking.

Uses the generated ei::Text bindings from #12; independent of the high-level EiEvent/EisRequest work in #27.

@ids1024

ids1024 commented Jun 15, 2026

Copy link
Copy Markdown
Owner

It would probably be good to have this as a separate example, or a command line argument on the same example. Although ei_text is definitely the correct way to do this now on compositors that support it, the current type-text example is a nice demonstration and test case for the ei_keyboard protocol.

Adds a separate type-text-ei example that binds ei_text (libei 1.6.0) and
sends a UTF-8 string in a single text.utf8() call, instead of reverse-mapping
characters to keycodes. The existing type-text example is kept unchanged as a
demonstration and test case for the ei_keyboard protocol; xkbcommon stays a
dev-dependency for it.
@glamberson

Copy link
Copy Markdown
Contributor Author

Sure. I've kept type-text unchanged and added the ei_text version as a separate type-text-ei example, so the ei_keyboard demonstration (and its xkbcommon dev-dep) stays. Rebased onto master; the PR is now purely additive.

@ids1024
ids1024 merged commit 7603152 into ids1024:master Jun 16, 2026
3 checks passed
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

Successfully merging this pull request may close these issues.

2 participants