mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2026-01-29 09:01:54 +08:00
using evdev instead of string constants
This commit is contained in:
@@ -24,7 +24,7 @@ from typing import Any
|
||||
|
||||
import pytest
|
||||
|
||||
from kvmd.keyboard.mappings import KEYMAP
|
||||
from kvmd.keyboard.mappings import WEB_TO_EVDEV
|
||||
|
||||
from kvmd.validators import ValidatorError
|
||||
from kvmd.validators.hid import valid_hid_key
|
||||
@@ -35,7 +35,7 @@ from kvmd.validators.hid import valid_hid_mouse_delta
|
||||
|
||||
# =====
|
||||
def test_ok__valid_hid_key() -> None:
|
||||
for key in KEYMAP:
|
||||
for key in WEB_TO_EVDEV:
|
||||
print(valid_hid_key(key))
|
||||
print(valid_hid_key(key + " "))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user