-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7273597
commit 9581092
Showing
5 changed files
with
72 additions
and
19 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
HIDMAN_DEVICE=/dev/input/event7 | ||
HIDMAN_DEVICE=/dev/input/event6 |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
version: '3.7' | ||
|
||
x-hidmanbase: &hidman-base | ||
|
||
volumes: | ||
- type: bind | ||
source: ../ | ||
target: /usr/local/src/hidman | ||
|
||
image: iitschri/hidman:latest | ||
|
||
privileged: true | ||
stdin_open: true | ||
tty: true | ||
network_mode: host | ||
|
||
services: | ||
|
||
hidman-server: | ||
<<: *hidman-base | ||
command: python3 /usr/local/src/hidman/apps/python-examples/server.py | ||
devices: | ||
- ${HIDMAN_DEVICE}:/dev/input/hidman0 | ||
|
||
hidman-client: | ||
<<: *hidman-base | ||
command: python3 /usr/local/src/hidman/apps/python-examples/client_timeout.py | ||
depends_on: | ||
- hidman-server |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
from hidman.core import HIDClient, HIDKeyboard | ||
|
||
|
||
dev = HIDClient(address="tcp://localhost:6666") | ||
|
||
while True: | ||
print(dev.waitEvent(timeout_ms=3000)) |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
__authors__ = 'Davide De Tommaso' | ||
__emails__ = '[email protected]' | ||
__license__ = 'MIT' | ||
__version__ = '0.2' | ||
__version__ = '0.3' | ||
__description__ = 'A Python based HID (Human Interface Device) events manager' | ||
__requirements__ = ['pytest>=6.2.4', 'evdev>=1.4.0', 'pyzmq>=22.1.0'] |
This file contains 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