Comments (4)
Hello,
I must admit I don't know how to fix this at the moment. My initial idea was to add EV_LED
and EV_MSC
to the UInput constructor (by default, the uinput device can inject only EV_KEY
+ EV_BTN
events).
from evdev import *
cap = {
ecodes.EV_KEY: list(ecodes.keys.keys()),
ecodes.EV_LED: list(ecodes.LED.keys())[:-2],
ecodes.EV_MSC: list(ecodes.MSC.keys())[:-2],
}
dev = InputDevice('/dev/input/event3')
ui = UInput(cap)
dev.grab()
for ev in dev.read_loop():
ui.write_event(ev)
The events emitted through UInput and those that my keyboard typically emits when NUM_LOCK
is pressed apprear to be the same.
I'll look in to it. Thank you for reporting this.
from python-evdev.
Thank you very much for your answer!
I will be wait a solution. This is very usefull feature for the keys mapping applications.
from python-evdev.
Hello @ellysh . Pull request #13 introduced a viable workaround to this problem. Leds can now be set through dev.set_led(...)
.
I'm still not sure why this happens, but I have a feeling it's not entirely related to python-evdev.
from python-evdev.
Thank you very much!
Now it works well.
from python-evdev.
Related Issues (20)
- Documentation fix HOT 3
- OSError: [Errno 19] No such device: '/dev/input/event0', after unplugging event0
- Enforce key repeat by kernel HOT 2
- RFE: please restart making github releases
- Cannot open joystick (js0) device
- Cannot open input device HOT 1
- Forwarding EV_UINPUT events for FF is difficult due to undocumented behaviour HOT 4
- evdev not working for Wayland
- timeout read_loop? HOT 1
- UInput: Constructor can throw exception, leaving open a uinput fd HOT 19
- Incorrect device node found when creating more than one UInput device HOT 5
- Error 11 : write could not complete without blocking
- [SOLVED] Not getting any device when running as a daemon HOT 2
- `evdev` Not Correctly Capturing LEFTSHIFT Key Presses
- EvDev D-pad errors. HOT 4
- Many duplicate UInput force-feedback events with async HOT 1
- Unknown Files HOT 4
- sleep 1s after UI_DEV_CREATE
- Insufficient delay in UInput._find_device_fallback() HOT 11
- Mouse injection not working 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 python-evdev.