Skip to content

OSK infrastructure - #2803

Open
leolost2605 wants to merge 8 commits into
mainfrom
leolost/on-screen-keyboard
Open

OSK infrastructure#2803
leolost2605 wants to merge 8 commits into
mainfrom
leolost/on-screen-keyboard

Conversation

@leolost2605

@leolost2605 leolost2605 commented Mar 26, 2026

Copy link
Copy Markdown
Member

Fixes #1460
Fixes elementary/keyboard#2
Fixes elementary/keyboard#3
Fixes elementary/keyboard#5

Note: To test this you need to start an app with GTK_IM_MODULE=wayland

TODO:

  • icons for special buttons
  • Popup keys -> follow up
  • Language selection -> follow up
  • Emoji selection -> follow up
  • IBus suggestions -> follow up

@leolost2605

leolost2605 commented Mar 26, 2026

Copy link
Copy Markdown
Member Author

This should be enough infrastructure for an initial osk:

Kooha-2026-03-26-18-20-52.mp4

@danirabbit @desiderantes any opinions/suggestions on design etc.? (I pinged you because I saw you talked about OSK in discord). If you have some ideas regarding structure/design/etc. that would be great!

If not I'll probably do it like GNOME does it so that we can also reuse their file format for keyboard layouts 🤷

@leolost2605
leolost2605 force-pushed the leolost/on-screen-keyboard branch 2 times, most recently from 8a760c6 to 2c54ea1 Compare March 26, 2026 20:53
@danirabbit

Copy link
Copy Markdown
Member

@leolost2605 being able to re-use layouts from an existing OSK sounds like a good idea to me! We can always revisit if for some reason it's too restrictive, but otherwise I like doing less work 😜

@leolost2605
leolost2605 force-pushed the leolost/on-screen-keyboard branch from 2c54ea1 to a963c68 Compare March 26, 2026 21:27
@desiderantes

Copy link
Copy Markdown

There's some wayland protocols for virtual keyboards that might be of interest ( I experimented implementing them, because I was playing with basing the logic on the Android keyboard). Mainly the one for virtual keyboard and maybe input v2

@leolost2605
leolost2605 force-pushed the leolost/on-screen-keyboard branch from a963c68 to a74d8f6 Compare April 7, 2026 22:34
@leolost2605

leolost2605 commented Apr 7, 2026

Copy link
Copy Markdown
Member Author

There's some wayland protocols for virtual keyboards that might be of interest ( I experimented implementing them, because I was playing with basing the logic on the Android keyboard). Mainly the one for virtual keyboard and maybe input v2

Thanks for the input! I don't think input v2 applies here. Also we have usually done any interaction with the compositor that doesn't involve actual surfaces via dbus so I would keep doing it via dbus in this case too.

@leolost2605
leolost2605 force-pushed the leolost/on-screen-keyboard branch 2 times, most recently from ab72774 to 5356643 Compare April 22, 2026 12:39
@leolost2605
leolost2605 force-pushed the leolost/on-screen-keyboard branch 2 times, most recently from 955ec4c to 0029961 Compare May 12, 2026 18:21
@danirabbit danirabbit added this to OS 9 May 12, 2026
@danirabbit danirabbit moved this to In progress in OS 9 May 12, 2026
@leolost2605
leolost2605 force-pushed the leolost/on-screen-keyboard branch 4 times, most recently from 521c92d to 517837b Compare May 20, 2026 11:11
@leolost2605
leolost2605 force-pushed the leolost/on-screen-keyboard branch from 517837b to 5aec68d Compare May 22, 2026 17:42
@leolost2605
leolost2605 force-pushed the leolost/on-screen-keyboard branch from 7a21105 to 7471c77 Compare June 4, 2026 20:32
@leolost2605
leolost2605 force-pushed the leolost/on-screen-keyboard branch from 6e5295f to 314d403 Compare June 26, 2026 09:25
@leolost2605
leolost2605 force-pushed the leolost/on-screen-keyboard branch 3 times, most recently from eeb4292 to 614609e Compare August 1, 2026 18:23
@leolost2605
leolost2605 force-pushed the leolost/on-screen-keyboard branch from ef77c3a to 322d214 Compare August 1, 2026 18:49
@leolost2605
leolost2605 marked this pull request as ready for review August 1, 2026 18:49
@leolost2605

leolost2605 commented Aug 1, 2026

Copy link
Copy Markdown
Member Author

I've been using this for a few months now and it's working great. I haven't marked this ready the whole time because I wanted to get the TODOs done but I think it's probably better to save them for a follow up since the main thing is already working great. So this should be ready for review now. The main TODO that maybe should still be done in this PR are icons for

  • delete
  • enter
  • shift
  • hiding the keyboard

To test this you need to be in touch mode (tablets by default, 2 in 1s when in tablet mode) or enable it manually via /org/gnome/desktop/a11y/applications/screen-keyboard-enabled. Also the same things as in #2793 apply (GTK_IM_MODULE must be unset or set to wayland)

image

@leolost2605
leolost2605 requested review from a team August 1, 2026 19:00
@danirabbit

Copy link
Copy Markdown
Member

If someone doesn't get to it before me I'll propose icons Monday!

@danirabbit danirabbit self-assigned this Aug 1, 2026
@wpkelso

wpkelso commented Aug 1, 2026

Copy link
Copy Markdown
Member

@danirabbit Many keyboards I've seen use symbols that have unicode codepoints in the misc. technical block or the [arrows block] for the action and modifier keys. That might could be another solution? Some of them are... questionable in GitHub's choice of font lol

For example:
⌘ ⌥ ⌫ ⌦ ⌨ ⎇ ⎆ ⏎ ⏿

@danirabbit

Copy link
Copy Markdown
Member

it looks like we actually get icon names from the layout json files:

  • osk-caps-lock-symbolic
  • osk-delete-symbolic
  • osk-emoji-picker-symbolic
  • osk-enter-symbolic
  • osk-hide-symbolic
  • osk-layout-symbolic
  • osk-shift-symbolic
  • osk-zwnj-symbolic

@danirabbit danirabbit left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving on behalf of UX! This is a super awesome start. Already pretty nice to type on. Can't wait to continue to iterate here 🩷

@danirabbit
danirabbit requested a review from a team August 2, 2026 18:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In progress

4 participants