use real sounds from kbsim

This commit is contained in:
2026-06-08 23:34:32 -07:00
parent 43e9d77de9
commit b5345f0345
168 changed files with 815 additions and 181 deletions
+25 -5
View File
@@ -1,23 +1,43 @@
from typing import Literal
from __future__ import annotations
from typing import Literal, Optional
from pydantic import BaseModel, Field
SwitchType = Literal["cherry-mx-blue", "cherry-mx-red", "cherry-mx-brown"]
SwitchType = Literal[
"cream",
"holypanda",
"alpaca",
"turquoise",
"inkblack",
"inkred",
"mxblack",
"mxbrown",
"mxblue",
"boxnavy",
"buckling",
"alpsblue",
"topre",
]
class Marker(BaseModel):
id: str
time: float = Field(ge=0)
key: str
code: Optional[str] = None
release_time: Optional[float] = Field(default=None, ge=0, alias="releaseTime")
model_config = {"populate_by_name": True}
class Project(BaseModel):
version: int = 1
switch: SwitchType = "cherry-mx-blue"
version: int = 2
switch: SwitchType = "mxbrown"
markers: list[Marker] = Field(default_factory=list)
class ExportRequest(BaseModel):
duration: float = Field(gt=0)
switch: SwitchType = "cherry-mx-blue"
switch: SwitchType = "mxbrown"
markers: list[Marker] = Field(default_factory=list)