blob: ae834fb13c3b7e6be35b516f40fba29bf0a8bc20 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
https://github.com/waycrate/xdg-desktop-portal-luminous/commit/11866c1db91d
--- src/remotedesktop/state.rs.orig 2025-06-26 13:00:06 UTC
+++ src/remotedesktop/state.rs
@@ -132,18 +132,19 @@ impl AppData {
}
pub fn notify_keyboard_keycode(&mut self, keycode: i32, state: u32) {
+ let pressed_key: u32 = KeyState::Pressed.into();
match self.get_modifier_from_keycode(keycode) {
// Caps lock is managed differently as it's the only
// modifier key that is still active after being released
Some(Modifiers::CapsLock) => {
- if state == KeyState::Pressed.into() {
+ if state == pressed_key {
self.mods ^= BitFlags::from_flag(Modifiers::CapsLock).bits();
self.virtual_keyboard.modifiers(self.mods, 0, 0, 0)
}
}
// Other modifier keys
Some(modifier) => {
- if state == KeyState::Pressed.into() {
+ if state == pressed_key {
self.mods |= BitFlags::from_flag(modifier).bits()
} else {
self.mods &= !BitFlags::from_flag(modifier).bits()
|