mirror of
https://github.com/feschber/lan-mouse.git
synced 2026-05-21 06:45:38 -06:00
use all modifiers to switch back instead of ESC
This commit is contained in:
parent
76261ad24a
commit
7a2c82a4e1
1 changed files with 6 additions and 8 deletions
|
|
@ -360,9 +360,12 @@ impl Dispatch<wl_keyboard::WlKeyboard, ()> for App {
|
|||
_: &QueueHandle<Self>,
|
||||
) {
|
||||
match event {
|
||||
wl_keyboard::Event::Key { serial: _, time: _, key, state: _ } => {
|
||||
if key == 1 {
|
||||
// ESC key
|
||||
wl_keyboard::Event::Key {..} => {
|
||||
app.connection.send_event(event);
|
||||
}
|
||||
wl_keyboard::Event::Modifiers { mods_depressed, ..} => {
|
||||
app.connection.send_event(event);
|
||||
if mods_depressed == 77 { // ctrl shift super alt
|
||||
if let Some(pointer_lock) = app.pointer_lock.as_ref() {
|
||||
pointer_lock.destroy();
|
||||
app.pointer_lock = None;
|
||||
|
|
@ -375,13 +378,8 @@ impl Dispatch<wl_keyboard::WlKeyboard, ()> for App {
|
|||
shortcut_inhibitor.destroy();
|
||||
app.shortcut_inhibitor = None;
|
||||
}
|
||||
} else {
|
||||
app.connection.send_event(event);
|
||||
}
|
||||
}
|
||||
wl_keyboard::Event::Modifiers {..} => {
|
||||
app.connection.send_event(event);
|
||||
}
|
||||
wl_keyboard::Event::Keymap { format:_ , fd, size:_ } => {
|
||||
let mmap = unsafe { Mmap::map(&File::from_raw_fd(fd.as_raw_fd())).unwrap() };
|
||||
app.connection.offer_data(protocol::DataRequest::KeyMap, mmap);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue