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

Input method and virtual keyboard #93

Draft
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

rano-oss
Copy link

@rano-oss rano-oss commented Dec 25, 2023

Adds input method client support to make input methods. Input method support is enabled with a flag and will grab the keyboard. Current protocol also needs virtual keyboard to make a complete input method, therefore support for this is also added.

use super::input_method::keyboard::RawModifiers;

#[derive(Debug)]
pub struct VirtualKeyboardManager<T> {
Copy link
Member

Choose a reason for hiding this comment

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

I wonder if it would make sense to provide a simple helper for the virtual keyboard protocol in smithay-client-toolkit. Though it's not too complicated of a protocol.

Copy link
Author

Choose a reason for hiding this comment

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

Virtual keyboard is really small and kind of niche, maybe it would make more sense a library/crate that can be used with sctk?

Copy link
Author

Choose a reason for hiding this comment

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

Might be an idea to move a lot of the boilerplate code to its own crate, niche_sctk or something like that

Copy link
Member

Choose a reason for hiding this comment

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

Personally I don't see an issue with having fairly niche things (that are commonly supported standard Wayland protocols) in sctk. As long as they don't significantly increase build time (then they could have feature flags) or distract too much from the more widely used parts of the crate. I don't know what others think about that though.

Copy link
Author

Choose a reason for hiding this comment

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

I will make a pr for both and see what happens :)

@ids1024
Copy link
Member

ids1024 commented Dec 25, 2023

This should be useful if we want to create an on screen keyboard for Cosmic. Input-method + layer-shell seems to be the standard approach for that on Wayland.

@rano-oss rano-oss closed this Feb 9, 2024
@rano-oss rano-oss force-pushed the input_method_and_virtual_keyboard branch from fca040d to 8b7b0bf Compare February 9, 2024 22:33
@rano-oss rano-oss reopened this Feb 9, 2024
@rano-oss rano-oss marked this pull request as draft February 9, 2024 22:57
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