|
|
|
@ -1,7 +1,7 @@
|
|
|
|
|
use crate::client::{build_client, WMClient};
|
|
|
|
|
use crate::config::action::Action;
|
|
|
|
|
use crate::config::application::Application;
|
|
|
|
|
use crate::config::key_action::{KeyAction, MultiPurposeKey, PressReleaseKey};
|
|
|
|
|
use crate::config::key_action::{KeyAction, ModifierKey, MultiPurposeKey, PressReleaseKey};
|
|
|
|
|
use crate::config::key_press::{KeyPress, Modifier};
|
|
|
|
|
use crate::config::keymap::{build_override_table, OverrideEntry};
|
|
|
|
|
use crate::config::remap::Remap;
|
|
|
|
@ -162,6 +162,17 @@ impl EventHandler {
|
|
|
|
|
) -> Result<Vec<(Key, i32)>, Box<dyn Error>> {
|
|
|
|
|
let keys = match key_action {
|
|
|
|
|
KeyAction::Key(modmap_key) => vec![(modmap_key, value)],
|
|
|
|
|
KeyAction::ModifierKey(ModifierKey { modifier }) => {
|
|
|
|
|
if modifier {
|
|
|
|
|
if value == PRESS {
|
|
|
|
|
self.modifiers.insert(key);
|
|
|
|
|
} else if value == RELEASE {
|
|
|
|
|
self.modifiers.remove(&key);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
// Process this key only in xremap
|
|
|
|
|
vec![]
|
|
|
|
|
}
|
|
|
|
|
KeyAction::MultiPurposeKey(MultiPurposeKey {
|
|
|
|
|
held,
|
|
|
|
|
alone,
|
|
|
|
|