simple-im: add support for unicode input
This commit is contained in:
parent
9ac4fea594
commit
481e9b3854
13 changed files with 158 additions and 1 deletions
|
|
@ -88,6 +88,7 @@ pub enum SimpleCommand {
|
|||
EnableSimpleIm(bool),
|
||||
ToggleSimpleImEnabled,
|
||||
ReloadSimpleIm,
|
||||
EnableUnicodeInput,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue