Fix review
This commit is contained in:
parent
0312e734c0
commit
726884f1f3
@ -1369,10 +1369,12 @@ impl Connection {
|
|||||||
me.press
|
me.press
|
||||||
};
|
};
|
||||||
|
|
||||||
let key = match me.mode.unwrap() {
|
let key = match me.mode.enum_value_or_default() {
|
||||||
KeyboardMode::Map => Some(crate::keyboard::keycode_to_rdev_key(me.chr())),
|
KeyboardMode::Map => {
|
||||||
|
Some(crate::keyboard::keycode_to_rdev_key(me.chr()))
|
||||||
|
}
|
||||||
KeyboardMode::Translate => {
|
KeyboardMode::Translate => {
|
||||||
if let Some(key_event::Union::Chr(code)) = me.union.clone() {
|
if let Some(key_event::Union::Chr(code)) = me.union {
|
||||||
Some(crate::keyboard::keycode_to_rdev_key(code & 0x0000FFFF))
|
Some(crate::keyboard::keycode_to_rdev_key(code & 0x0000FFFF))
|
||||||
} else {
|
} else {
|
||||||
None
|
None
|
||||||
|
Loading…
x
Reference in New Issue
Block a user