|
|
|
@ -329,7 +329,7 @@ impl EventHandler {
|
|
|
|
|
// fallthrough on state discrepancy
|
|
|
|
|
vec![(key, value)]
|
|
|
|
|
}
|
|
|
|
|
ModmapAction::PressReleaseKey(PressReleaseKey { press, release }) => {
|
|
|
|
|
ModmapAction::PressReleaseKey(PressReleaseKey { skip_key_event, press, release }) => {
|
|
|
|
|
// Just hook actions, and then emit the original event. We might want to
|
|
|
|
|
// support reordering the key event and dispatched actions later.
|
|
|
|
|
if value == PRESS || value == RELEASE {
|
|
|
|
@ -344,8 +344,14 @@ impl EventHandler {
|
|
|
|
|
&key,
|
|
|
|
|
)?;
|
|
|
|
|
}
|
|
|
|
|
// Dispatch the original key as well
|
|
|
|
|
vec![(key, value)]
|
|
|
|
|
|
|
|
|
|
if skip_key_event {
|
|
|
|
|
// Do not dispatch the original key
|
|
|
|
|
vec![(Key::KEY_UNKNOWN, value)]
|
|
|
|
|
} else {
|
|
|
|
|
// dispatch the original key
|
|
|
|
|
vec![(key, value)]
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
Ok(keys)
|
|
|
|
|