mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2026-01-29 00:51:53 +08:00
ps2keyboard -> keyboard
This commit is contained in:
@@ -3,7 +3,7 @@ import asyncio
|
|||||||
from .application import init
|
from .application import init
|
||||||
from .logging import get_logger
|
from .logging import get_logger
|
||||||
|
|
||||||
from .ps2 import Ps2Keyboard
|
from .keyboard import Keyboard
|
||||||
from .atx import Atx
|
from .atx import Atx
|
||||||
from .msd import MassStorageDevice
|
from .msd import MassStorageDevice
|
||||||
from .streamer import Streamer
|
from .streamer import Streamer
|
||||||
@@ -18,7 +18,7 @@ def main() -> None:
|
|||||||
with gpio.bcm():
|
with gpio.bcm():
|
||||||
loop = asyncio.get_event_loop()
|
loop = asyncio.get_event_loop()
|
||||||
|
|
||||||
keyboard = Ps2Keyboard(
|
keyboard = Keyboard(
|
||||||
clock=int(config["keyboard"]["pinout"]["clock"]),
|
clock=int(config["keyboard"]["pinout"]["clock"]),
|
||||||
data=int(config["keyboard"]["pinout"]["data"]),
|
data=int(config["keyboard"]["pinout"]["data"]),
|
||||||
pulse=float(config["keyboard"]["pulse"]),
|
pulse=float(config["keyboard"]["pulse"]),
|
||||||
|
|||||||
@@ -76,7 +76,7 @@ def _key_event_to_ps2_codes(event: _KeyEvent) -> List[int]:
|
|||||||
return []
|
return []
|
||||||
|
|
||||||
|
|
||||||
class Ps2Keyboard(multiprocessing.Process):
|
class Keyboard(multiprocessing.Process):
|
||||||
# http://dkudrow.blogspot.com/2013/08/ps2-keyboard-emulation-with-arduino-uno.html
|
# http://dkudrow.blogspot.com/2013/08/ps2-keyboard-emulation-with-arduino-uno.html
|
||||||
|
|
||||||
def __init__(self, clock: int, data: int, pulse: float) -> None:
|
def __init__(self, clock: int, data: int, pulse: float) -> None:
|
||||||
@@ -13,7 +13,7 @@ from typing import Type
|
|||||||
|
|
||||||
import aiohttp.web
|
import aiohttp.web
|
||||||
|
|
||||||
from .ps2 import Ps2Keyboard
|
from .keyboard import Keyboard
|
||||||
|
|
||||||
from .atx import Atx
|
from .atx import Atx
|
||||||
|
|
||||||
@@ -66,7 +66,7 @@ def _json_200(result: Optional[Dict]=None) -> aiohttp.web.Response:
|
|||||||
class Server: # pylint: disable=too-many-instance-attributes
|
class Server: # pylint: disable=too-many-instance-attributes
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
keyboard: Ps2Keyboard,
|
keyboard: Keyboard,
|
||||||
atx: Atx,
|
atx: Atx,
|
||||||
msd: MassStorageDevice,
|
msd: MassStorageDevice,
|
||||||
streamer: Streamer,
|
streamer: Streamer,
|
||||||
|
|||||||
Reference in New Issue
Block a user