mirror of
https://github.com/jeertmans/manim-slides.git
synced 2025-08-06 14:19:52 +08:00
feat(cli): add basic logging facilities (#50)
* feat(cli): add basic logging facilities This PR adds basic logging support, to be extended in the future. * fix: typo in decorator name
This commit is contained in:
@ -5,6 +5,7 @@ from typing import List, Optional, Set
|
||||
from pydantic import BaseModel, root_validator, validator
|
||||
|
||||
from .defaults import LEFT_ARROW_KEY_CODE, RIGHT_ARROW_KEY_CODE
|
||||
from .manim import logger
|
||||
|
||||
|
||||
class Key(BaseModel):
|
||||
@ -20,7 +21,12 @@ class Key(BaseModel):
|
||||
return v
|
||||
|
||||
def match(self, key_id: int):
|
||||
return key_id in self.ids
|
||||
m = key_id in self.ids
|
||||
|
||||
if m:
|
||||
logger.debug(f"Pressed key: {self.name}")
|
||||
|
||||
return m
|
||||
|
||||
|
||||
class Config(BaseModel):
|
||||
|
Reference in New Issue
Block a user