1
0
Fork 0
forked from wry/wry

simple-im: add support for unicode input

This commit is contained in:
Julian Orth 2025-10-16 15:46:49 +02:00
parent 9ac4fea594
commit 481e9b3854
13 changed files with 158 additions and 1 deletions

View file

@ -88,6 +88,7 @@ pub enum SimpleCommand {
EnableSimpleIm(bool),
ToggleSimpleImEnabled,
ReloadSimpleIm,
EnableUnicodeInput,
}
#[derive(Debug, Clone)]

View file

@ -159,6 +159,7 @@ impl ActionParser<'_> {
"disable-simple-im" => EnableSimpleIm(false),
"toggle-simple-im-enabled" => ToggleSimpleImEnabled,
"reload-simple-im" => ReloadSimpleIm,
"enable-unicode-input" => EnableUnicodeInput,
_ => {
return Err(
ActionParserError::UnknownSimpleAction(string.to_string()).spanned(span)

View file

@ -236,6 +236,10 @@ impl Action {
let persistent = state.persistent.clone();
b.new(move || persistent.seat.reload_simple_im())
}
SimpleCommand::EnableUnicodeInput => {
let persistent = state.persistent.clone();
b.new(move || persistent.seat.enable_unicode_input())
}
},
Action::Multi { actions } => {
let actions: Vec<_> = actions.into_iter().map(|a| a.into_fn(state)).collect();