rbarrois / inputexec Goto Github PK
View Code? Open in Web Editor NEWSimple program to execute commands on keypress on headless Linux
Simple program to execute commands on keypress on headless Linux
I made a fresh virtual envirenment without site packages and installed inputexec via pip.
When I start it with inputexec --source-file=/dev/input/event0 --action-mode=print
I get the following output:
Traceback (most recent call last):
File "/home/xengi/tmp/testenv/bin/inputexec", line 10, in <module>
from inputexec import cli
File "/home/xengi/tmp/testenv/lib/python3.3/site-packages/inputexec/cli.py", line 17, in <module>
from . import executors
File "/home/xengi/tmp/testenv/lib/python3.3/site-packages/inputexec/executors.py", line 9, in <module>
import Queue
ImportError: No module named 'Queue'
I'm using Python 3.3.3.
Hi!
I want to run inputexec as service so I set up a systemd service like this in /etc/systemd/system/[email protected]
[Unit]
Description=Home Assistant
After=network.target
[Service]
Type=simple
User=%i
Environment='config=--config /home/pi/inputexec/scripts/config.ini'
ExecStart=/usr/local/bin/inputexec $config
[Install]
WantedBy=multi-user.target
When I start the service, I only get:
● [email protected] - Inputexec
Loaded: loaded (/etc/systemd/system/[email protected]; enabled)
Active: inactive (dead) since Thu 2017-06-15 23:20:43 CEST; 7s ago
Process: 1398 ExecStart=/usr/local/bin/inputexec $config (code=exited, status=0/SUCCESS)
Main PID: 1398 (code=exited, status=0/SUCCESS)
Jun 15 23:20:43 raspberrypi_wozi systemd[1]: Started Inputexec.
with a grey bullet point. inputexec runs nicely in the commandline with the user 'pi'. Do I have to set this up differently?
Hi!
First of all, thank you for this nice piece of software! It works great!
Since I have only a few buttons on my remote, I would like to use a hold function were I hold a key for, let's say a second, and a different command is given. Same with doubleclicks. Do you think this is possible?
Best, vrs01
Thanks for your work in this tool,
I have noticed the issue, #1
but it talks about python 3.3, and the last update on this repo was on jun 2018.
Can you confirm that it is compatible with python 3.8 ?
If so, could you update the README ? It currently says:
Installation
inputexec is distributed under the 2-clause BSD license, and needs Python 2.6-3.3
and that makes it confusing.
Some guy tried to install it with python 3.6 and this happened, https://gleichrichter.wordpress.com/2018/07/13/the-way-to-ir-sans-lirc/
... inputexec. .... looks very promising as it seems to target my usage case on the spot. But I fail to install the python script. First I get complains about UTF-8 problems and later some str – decode stuff. The first I fixed the simple way: Removing the UTF-8 chars. But the second one was above my current python capabilities. Probably that problem came with python 3.6 vs. 3.3. So inputexec gets dismissed......
With that clarified and the README polished, it would be easier to create a package, for example for ArchLinux/AUR.
Thanks for this piece of software, i use it for bluetooth controls to mpc - had the same problem.
I use a config file and it outputs the correct keycodes - but doesn't seem to do anything. Is this a known problem with python3? Any way to debug the commands?
Thanks,
R
I need to run this command "sudo echo "pause" | telnet 127.0.0.1 9090" on a key press. I have included it in example.ini. It is giving an error "sudo: unable to resolve host max2play".
I can run that command
inputexec --action-commands=/usr/local/example.ini --source-file=/dev/input/by-path/platform-b0170000.i2c-platform-atc2603c-irkeypad.0-event-mouse --action-mode=run_sync
manually on the terminal it is working fine. Could you please help.
Hi,
First thanks for this good tool.
I don't really know how evdev works internally and i wonder if using inputexec
in shared mode could introduce some kind of input latency (or input lag) in others software using the device ?
Do you have some clues about that?
Hi, its me again with another question.
Does inputexec supports key combinations like "CTRL + SHIFT + F3" ?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.