event-sequence-transformation/config.cfg

86 lines
1.2 KiB
INI
Raw Normal View History

2024-08-17 16:46:48 +03:00
constants = {
my_modifier = 9;
};
2024-08-16 12:58:19 +03:00
enums = {
namespaces: ["stdin", "clickpad"];
2024-08-16 11:12:20 +03:00
};
2024-08-16 23:48:09 +03:00
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";
}
);
};
2024-08-16 23:48:09 +03:00
};
nodes = {
stdin = {
type = "getchar";
options = {
2024-08-16 12:58:19 +03:00
namespace = "namespaces.stdin";
};
};
print = {
type = "print";
options = {};
};
clickpad = {
type = "evdev";
options = {
file = "/dev/input/event7";
2024-08-16 12:58:19 +03:00
namespace = "namespaces.clickpad";
};
};
2024-08-17 12:35:36 +03:00
select_key_events = {
type = "router";
options = {
2024-08-17 16:46:48 +03:00
predicates = (
"key_event",
{
type = "or";
inverted = 1;
args = ["key_event"];
}
);
};
};
set_modifier = {
type = "modifiers";
options = {
operation = "set";
modifiers = ["my_modifier"];
2024-08-17 12:35:36 +03:00
};
};
};
channels = ({
from: ("stdin", 0);
2024-08-17 12:35:36 +03:00
to: ("select_key_events", 0);
}, {
from: ("clickpad", 0);
2024-08-17 12:35:36 +03:00
to: ("select_key_events", 1);
}, {
from: ("select_key_events", 0);
2024-08-17 16:46:48 +03:00
to: ("set_modifier", 0);
}, {
from: ("set_modifier", 0);
2024-08-17 12:35:36 +03:00
to: ("print", 0);
2024-08-17 16:46:48 +03:00
}, {
from: ("select_key_events", 1);
to: ("print", 1);
});
// vim: ft=libconfig