Compare commits
No commits in common. "97b90cd1af35e99b745ba08218b0d255bdbc71fd" and "58dc2cc84a4237b626a1505a473368eea0a7069a" have entirely different histories.
97b90cd1af
...
58dc2cc84a
2
config.c
2
config.c
|
@ -392,8 +392,6 @@ load_config(const config_setting_t *config_root, FullConfig *config)
|
|||
const config_setting_t *enums_config = config_setting_get_member(config_root, "enums");
|
||||
const config_setting_t *predicates_config = config_setting_get_member(config_root, "predicates");
|
||||
hash_table_init(&config->constants, NULL);
|
||||
hash_table_insert(&config->constants, hash_table_key_from_cstr("false"), (long long[1]) {0});
|
||||
hash_table_insert(&config->constants, hash_table_key_from_cstr("true"), (long long[1]) {1});
|
||||
populate_event_codes(&config->constants);
|
||||
load_constants_section(constants_config, &config->constants);
|
||||
load_enums_section(enums_config, &config->constants);
|
||||
|
|
|
@ -1,119 +0,0 @@
|
|||
enums = {
|
||||
namespaces: ["clickpad"];
|
||||
};
|
||||
|
||||
predicates = {
|
||||
is_evdev = {
|
||||
type = "code_ns";
|
||||
min = "namespaces.clickpad";
|
||||
max = "namespaces.clickpad";
|
||||
};
|
||||
key_event = {
|
||||
type = "and";
|
||||
args = (
|
||||
"is_evdev",
|
||||
{
|
||||
type = "code_major";
|
||||
min = "event_type.KEY";
|
||||
max = "event_type.KEY";
|
||||
}
|
||||
);
|
||||
};
|
||||
syn_event = {
|
||||
type = "and";
|
||||
args = (
|
||||
"is_evdev",
|
||||
{
|
||||
type = "code_major";
|
||||
min = "event_type.SYN";
|
||||
max = "event_type.SYN";
|
||||
}
|
||||
);
|
||||
};
|
||||
btn_quadtap_event = {
|
||||
type = "and";
|
||||
args = (
|
||||
"key_event",
|
||||
{
|
||||
type = "code_minor";
|
||||
min = "button_event.TOOL_QUADTAP";
|
||||
max = "button_event.TOOL_QUADTAP";
|
||||
}
|
||||
);
|
||||
};
|
||||
};
|
||||
|
||||
nodes = {
|
||||
clickpad = {
|
||||
type = "evdev";
|
||||
options = {
|
||||
file = "/dev/input/event7";
|
||||
namespace = "namespaces.clickpad";
|
||||
};
|
||||
};
|
||||
select_interesting_events = {
|
||||
type = "router";
|
||||
options = {
|
||||
predicates = ["syn_event", "btn_quadtap_event"];
|
||||
};
|
||||
};
|
||||
quadtap_subst_seq = {
|
||||
type = "tee";
|
||||
};
|
||||
morph_left_click = {
|
||||
type = "assign";
|
||||
options = {
|
||||
minor = "button_event.LEFT";
|
||||
};
|
||||
};
|
||||
morph_right_click = {
|
||||
type = "assign";
|
||||
options = {
|
||||
minor = "button_event.RIGHT";
|
||||
};
|
||||
};
|
||||
merge = {
|
||||
type = "tee";
|
||||
};
|
||||
virtual_out = {
|
||||
type = "uinput";
|
||||
options = {
|
||||
name = "Quadtap gesture";
|
||||
enabled_codes = (
|
||||
{major: "event_type.KEY"; minor: "button_event.LEFT"}
|
||||
,
|
||||
{major: "event_type.KEY"; minor: "button_event.RIGHT"}
|
||||
,
|
||||
{major: "event_type.KEY"; minor: "button_event.MIDDLE"}
|
||||
);
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
channels = ({
|
||||
from: ("clickpad", 0);
|
||||
to: ("select_interesting_events", 0);
|
||||
}, {
|
||||
from: ("select_interesting_events", 0); // EV_SYN
|
||||
to: ("merge", 0);
|
||||
}, {
|
||||
from: ("select_interesting_events", 1); // BTN_TOOL_QUADTAP
|
||||
to: ("quadtap_subst_seq", 0);
|
||||
}, {
|
||||
from: ("quadtap_subst_seq", 0);
|
||||
to: ("morph_left_click", 0);
|
||||
}, {
|
||||
from: ("quadtap_subst_seq", 1);
|
||||
to: ("morph_right_click", 0);
|
||||
}, {
|
||||
from: ("morph_left_click", 0);
|
||||
to: ("merge", 1);
|
||||
}, {
|
||||
from: ("morph_right_click", 0);
|
||||
to: ("merge", 2);
|
||||
}, {
|
||||
from: ("merge", 0);
|
||||
to: ("virtual_out", 0);
|
||||
});
|
||||
|
||||
// vim: ft=libconfig
|
Loading…
Reference in New Issue