Comments (2)
This happens because hooks were designed to operate on the current "state" of the keys instead of singular events, so they could accomodate activating on a combination of keys like "ctrl+A".
An obscure corner of the documentation (unfortunately) says the following about hooks:
Formally said, the hook triggers when (1) an event is received that matches one of the KEYs specified, (2) the last event whose type, code and domain matched that same KEY did not have a value matching that KEY, and (3) for all other KEYs, the last event whose type, code and domain matched those KEYs had a value matching those KEYs.
In short, sending multiple key::2
events will not trigger the hook again unless a key::0
event arrives in between.
(And it is "unfortunate" that it says so because it turned out that these semantics are flawed and do not interact nicely with some other systems such as --withhold
, but those semantics are kept because of backwards compatibility. If I ever release an evsieve 2.0, the semantics are going to be different.)
A somewhat hacky solution to make a hook trigger on every repeat event would be to use a map that turns every event into a press-release event:
evsieve --input /dev/input/event1 \
--map key:brightnessdown:1~2 ::1 ::0 \
--map key:brightnessup:1~2 ::1 ::0 \
--hook key:brightnessdown exec-shell="brillo -q -U 5; pkill -SIGRTMIN+9 waybar" \
--hook key:brightnessup exec-shell="brillo -q -A 5; pkill -SIGRTMIN+9 waybar"
from evsieve.
This workaround seems to work now, thanks
from evsieve.
Related Issues (20)
- Multi-touch finger count HOT 1
- Unknown event code mapping/copy issue HOT 2
- Possibility to map undefined keys (EV_KEY 300, 301) HOT 1
- 100% CPU usage when using --control-fifo HOT 2
- Handling of bluetooth input devices (no persistent device name, device may be unavailable at startup) HOT 2
- [RFC] Configuration file HOT 7
- compilation issues on 32 bits boards (+ patch) HOT 1
- Make virtual keyboard acts like "physical" HOT 3
- Is it possible to map a mouse's relative position to a controller's analog stick absolute position? HOT 2
- how to output as a virtual joystick? HOT 3
- will this work with Multi-pointers? HOT 2
- Key repeat request to kernel HOT 2
- Mouse Accelertion Profile & Pointer Speed HOT 1
- Multi bouton support? HOT 1
- `persist=reopen` does not prevent evsieve from exiting HOT 7
- Generating scroll event from hook HOT 1
- Question: is realtime scheduling priority needed/advised on underpowered hosts? HOT 2
- Slow vertical mouse movements aren't registered when using "--map rel ::0.5x" to reduce mouse sensitivity HOT 4
- Using evsieve to use Wiimote as a mouse: Is it possible? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from evsieve.