Ei protocol support
- Use the configured keyboard layout, track ei seats to reconfigure their keyboards - DBus interface - Disambiguate input devices per backend instance - Add support for `ei_keysym` and `ei_text` - Act as input method for ei_text UTF-8 injection - Create a region per output for abosolute pointer position - Map ei region for touchscreen emulation - Release pointer buttons and keys on removal - Send modifiers to EI connections
This commit is contained in:
parent
e939a72b30
commit
f4ee52c46a
15 changed files with 1092 additions and 218 deletions
|
|
@ -1,6 +1,7 @@
|
|||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
|
||||
use crate::{
|
||||
input::InputBackendId,
|
||||
shell::Shell,
|
||||
state::{BackendData, State},
|
||||
utils::prelude::OutputExt,
|
||||
|
|
@ -820,6 +821,27 @@ fn config_changed(config: cosmic_config::Config, keys: Vec<String>, state: &mut
|
|||
}
|
||||
}
|
||||
}
|
||||
let ei_connections = state
|
||||
.common
|
||||
.ei_keyboard_source
|
||||
.keys()
|
||||
.cloned()
|
||||
.collect::<Vec<_>>();
|
||||
for conn in &ei_connections {
|
||||
state.release_ei_keyboard(conn);
|
||||
state.clear_input_source_state(&InputBackendId::Ei(conn.clone()));
|
||||
}
|
||||
for ei_seat in state.common.ei_seats.values() {
|
||||
if let Err(err) =
|
||||
ei_seat.add_keyboard("virtual keyboard", xkb_config_to_wl(&value))
|
||||
{
|
||||
warn!(?err, "Failed to update libei keyboard keymap");
|
||||
}
|
||||
}
|
||||
if !state.common.ei_seats.is_empty() {
|
||||
let seat = state.common.shell.read().seats.last_active().clone();
|
||||
state.broadcast_ei_keyboard_modifiers(&seat);
|
||||
}
|
||||
state.common.config.cosmic_conf.xkb_config = value;
|
||||
}
|
||||
"keyboard_config" => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue