1
0
Fork 0
forked from wry/wry

config: allow consuming/forwarding key events

This commit is contained in:
Julian Orth 2024-04-15 18:42:59 +02:00
parent 6ee4fdb9f4
commit 18bc86d14f
12 changed files with 106 additions and 13 deletions

View file

@ -903,6 +903,10 @@ impl Client {
(rate, delay)
}
pub fn set_forward(&self, seat: Seat, forward: bool) {
self.send(&ClientMessage::SetForward { seat, forward })
}
pub fn parse_keymap(&self, keymap: &str) -> Keymap {
let res = self.send_with_response(&ClientMessage::ParseKeymap { keymap });
get_response!(res, Keymap(0), ParseKeymap { keymap });

View file

@ -436,6 +436,10 @@ pub enum ClientMessage<'a> {
device: InputDevice,
keymap: Keymap,
},
SetForward {
seat: Seat,
forward: bool,
},
}
#[derive(Serialize, Deserialize, Debug)]