Created
August 31, 2019 02:24
-
-
Save pdcastro/20fba3aeb63a6d37746e97cc9c9c653c to your computer and use it in GitHub Desktop.
dash-keyboard
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM balenalib/%%BALENA_MACHINE_NAME%%-python:3 | |
RUN apt-get update && apt-get install kbd git patch | |
RUN mkdir -p /usr/src/mydash | |
WORKDIR /usr/src/mydash | |
RUN git clone https://github.com/boppreh/keyboard | |
COPY keyboard.patch /usr/src/mydash/keyboard/ | |
RUN cd keyboard && patch -p1 < keyboard.patch | |
ENV PYTHONPATH="/usr/src/mydash/keyboard:${PYTHONPATH}" | |
CMD python keyboard/examples/stdin_stdout_events.py |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/keyboard/_nixcommon.py b/keyboard/_nixcommon.py | |
index a4d0d06..1984f23 100644 | |
--- a/keyboard/_nixcommon.py | |
+++ b/keyboard/_nixcommon.py | |
@@ -155,6 +155,7 @@ def aggregate_devices(type_name): | |
# duplicates. | |
devices_from_proc = list(list_devices_from_proc(type_name)) | |
+ devices_from_proc = [EventDevice('/dev/input/event0')] | |
if devices_from_proc: | |
return AggregatedEventDevice(devices_from_proc, output=fake_device) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment