|
@@ -50,7 +50,7 @@ class KeyboardKey(BaseModel):
|
|
@property
|
|
@property
|
|
def number(self) -> Optional[int]:
|
|
def number(self) -> Optional[int]:
|
|
"""Integer value of a number key."""
|
|
"""Integer value of a number key."""
|
|
- return int(self.name) if self.code.startswith('Digit') else None
|
|
|
|
|
|
+ return int(self.code.removeprefix('Digit')) if self.code.startswith('Digit') else None
|
|
|
|
|
|
@property
|
|
@property
|
|
def backspace(self) -> bool:
|
|
def backspace(self) -> bool:
|