mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2025-12-12 01:00:29 +08:00
moved hid to kvmd
This commit is contained in:
parent
940989b6e9
commit
089bac2bcd
@ -40,6 +40,10 @@ shell:
|
||||
make run TESTENV_CMD=/bin/bash
|
||||
|
||||
|
||||
regen:
|
||||
python3 genmap.py
|
||||
|
||||
|
||||
release:
|
||||
make clean
|
||||
make tox
|
||||
@ -66,7 +70,9 @@ push:
|
||||
clean:
|
||||
rm -rf build site dist pkg src *.egg-info kvmd-*.tar.gz
|
||||
find -name __pycache__ | xargs rm -rf
|
||||
make -C hid clean
|
||||
|
||||
|
||||
clean-all: clean
|
||||
rm -rf .tox .mypy_cache
|
||||
make -C hid clean-all
|
||||
|
||||
@ -18,13 +18,13 @@ def main() -> None:
|
||||
parts = row.split()
|
||||
keymap.append((int(parts[0]), parts[1], parts[2]))
|
||||
|
||||
with open("../kvmd/kvmd/data/keymap.yaml", "w") as kvmd_yaml_file:
|
||||
with open("kvmd/data/keymap.yaml", "w") as kvmd_yaml_file:
|
||||
yaml.dump({
|
||||
js_key: code
|
||||
for (code, _, js_key) in sorted(keymap, key=operator.itemgetter(2))
|
||||
}, kvmd_yaml_file, indent=4, default_flow_style=False)
|
||||
|
||||
with open("src/keymap.h", "w") as hid_header_file:
|
||||
with open("hid/src/keymap.h", "w") as hid_header_file:
|
||||
hid_header_file.write("#pragma once\n\n#include <HID-Project.h>\n\n#include \"inline.h\"\n\n\n")
|
||||
hid_header_file.write("INLINE KeyboardKeycode keymap(uint8_t code) {\n\tswitch(code) {\n")
|
||||
for (code, hid_key, _) in sorted(keymap, key=operator.itemgetter(1)):
|
||||
0
hid/.gitignore → kvmd/hid/.gitignore
vendored
0
hid/.gitignore → kvmd/hid/.gitignore
vendored
@ -14,8 +14,5 @@ upload:
|
||||
serial:
|
||||
platformio serialports monitor
|
||||
|
||||
regen:
|
||||
python3 genmap.py
|
||||
|
||||
clean:
|
||||
rm -rf .pioenvs .piolibdeps
|
||||
@ -6,26 +6,26 @@ skipsdist = True
|
||||
basepython = python3.7
|
||||
|
||||
[testenv:flake8]
|
||||
commands = flake8 kvmd
|
||||
commands = flake8 kvmd genmap.py
|
||||
deps =
|
||||
flake8
|
||||
flake8-double-quotes
|
||||
-rtestenv/requirements.txt
|
||||
|
||||
[testenv:pylint]
|
||||
commands = pylint --output-format=colorized --reports=no kvmd
|
||||
commands = pylint --output-format=colorized --reports=no kvmd genmap.py
|
||||
deps =
|
||||
pylint
|
||||
-rtestenv/requirements.txt
|
||||
|
||||
[testenv:mypy]
|
||||
commands = mypy kvmd
|
||||
commands = mypy kvmd genmap.py
|
||||
deps =
|
||||
mypy
|
||||
-rtestenv/requirements.txt
|
||||
|
||||
[testenv:vulture]
|
||||
commands = vulture kvmd vulture-wl.py
|
||||
commands = vulture kvmd genmap.py vulture-wl.py
|
||||
deps =
|
||||
vulture
|
||||
-rtestenv/requirements.txt
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user