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
|
make run TESTENV_CMD=/bin/bash
|
||||||
|
|
||||||
|
|
||||||
|
regen:
|
||||||
|
python3 genmap.py
|
||||||
|
|
||||||
|
|
||||||
release:
|
release:
|
||||||
make clean
|
make clean
|
||||||
make tox
|
make tox
|
||||||
@ -66,7 +70,9 @@ push:
|
|||||||
clean:
|
clean:
|
||||||
rm -rf build site dist pkg src *.egg-info kvmd-*.tar.gz
|
rm -rf build site dist pkg src *.egg-info kvmd-*.tar.gz
|
||||||
find -name __pycache__ | xargs rm -rf
|
find -name __pycache__ | xargs rm -rf
|
||||||
|
make -C hid clean
|
||||||
|
|
||||||
|
|
||||||
clean-all: clean
|
clean-all: clean
|
||||||
rm -rf .tox .mypy_cache
|
rm -rf .tox .mypy_cache
|
||||||
|
make -C hid clean-all
|
||||||
|
|||||||
@ -18,13 +18,13 @@ def main() -> None:
|
|||||||
parts = row.split()
|
parts = row.split()
|
||||||
keymap.append((int(parts[0]), parts[1], parts[2]))
|
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({
|
yaml.dump({
|
||||||
js_key: code
|
js_key: code
|
||||||
for (code, _, js_key) in sorted(keymap, key=operator.itemgetter(2))
|
for (code, _, js_key) in sorted(keymap, key=operator.itemgetter(2))
|
||||||
}, kvmd_yaml_file, indent=4, default_flow_style=False)
|
}, 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("#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")
|
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)):
|
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:
|
serial:
|
||||||
platformio serialports monitor
|
platformio serialports monitor
|
||||||
|
|
||||||
regen:
|
|
||||||
python3 genmap.py
|
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -rf .pioenvs .piolibdeps
|
rm -rf .pioenvs .piolibdeps
|
||||||
@ -6,26 +6,26 @@ skipsdist = True
|
|||||||
basepython = python3.7
|
basepython = python3.7
|
||||||
|
|
||||||
[testenv:flake8]
|
[testenv:flake8]
|
||||||
commands = flake8 kvmd
|
commands = flake8 kvmd genmap.py
|
||||||
deps =
|
deps =
|
||||||
flake8
|
flake8
|
||||||
flake8-double-quotes
|
flake8-double-quotes
|
||||||
-rtestenv/requirements.txt
|
-rtestenv/requirements.txt
|
||||||
|
|
||||||
[testenv:pylint]
|
[testenv:pylint]
|
||||||
commands = pylint --output-format=colorized --reports=no kvmd
|
commands = pylint --output-format=colorized --reports=no kvmd genmap.py
|
||||||
deps =
|
deps =
|
||||||
pylint
|
pylint
|
||||||
-rtestenv/requirements.txt
|
-rtestenv/requirements.txt
|
||||||
|
|
||||||
[testenv:mypy]
|
[testenv:mypy]
|
||||||
commands = mypy kvmd
|
commands = mypy kvmd genmap.py
|
||||||
deps =
|
deps =
|
||||||
mypy
|
mypy
|
||||||
-rtestenv/requirements.txt
|
-rtestenv/requirements.txt
|
||||||
|
|
||||||
[testenv:vulture]
|
[testenv:vulture]
|
||||||
commands = vulture kvmd vulture-wl.py
|
commands = vulture kvmd genmap.py vulture-wl.py
|
||||||
deps =
|
deps =
|
||||||
vulture
|
vulture
|
||||||
-rtestenv/requirements.txt
|
-rtestenv/requirements.txt
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user