Basic quadtap -> left_click + right_click config
This commit is contained in:
parent
1c9cdf80a0
commit
97b90cd1af
|
@ -0,0 +1,119 @@
|
|||
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