Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix small stuff #1

Merged
merged 2 commits into from
Jul 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
__pycache__/
.idea/
*.pyc
venv/
*.egg-info
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2023 Priyanshu Tripathi
Copyright (c) 2023-Present CharaChorder

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion charachorder/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@

from .device import *
from .errors import *
from .types import *
from ._types import *
File renamed without changes.
10 changes: 5 additions & 5 deletions charachorder/device.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
UnknownProduct,
UnknownVendor,
)
from .types import Chord, ChordPhrase, Keymap, OperatingSystem
from ._types import Chord, ChordPhrase, Keymap, OperatingSystem

if TYPE_CHECKING:
from typing_extensions import Self
Expand Down Expand Up @@ -266,7 +266,7 @@ def get_chordmap(self, index: int) -> tuple[Chord, ChordPhrase]:
return Chord.from_hex(chord), ChordPhrase.from_hex(phrase)

def get_chordmaps(self) -> Generator[tuple[Chord, ChordPhrase], None, None]:
"""Returns a iterable generator over all the chordmaps in the device."""
"""Returns an iterable generator over all the chordmaps in the device."""
chordmap_count = self.get_chordmap_count()
return (self.get_chordmap(i) for i in range(chordmap_count))

Expand Down Expand Up @@ -339,7 +339,7 @@ def is_serial_mouse_enabled(self) -> bool:
def is_usb_hid_keyboard_enabled(self) -> bool:
return bool(self.get_parameter(0x11))

def is_charachter_entry_enabled(self) -> bool:
def is_character_entry_enabled(self) -> bool:
return bool(self.get_parameter(0x12))

def get_key_scan_duration(self) -> int:
Expand Down Expand Up @@ -476,10 +476,10 @@ def enable_usb_hid_keyboard(self, *, commit: bool = False) -> bool:
def disable_usb_hid_keyboard(self, *, commit: bool = False) -> bool:
return self._maybe_commit(self.set_parameter(0x11, 0), commit)

def enable_charachter_entry(self, *, commit: bool = False) -> bool:
def enable_character_entry(self, *, commit: bool = False) -> bool:
return self._maybe_commit(self.set_parameter(0x12, 1), commit)

def disable_charachter_entry(self, *, commit: bool = False) -> bool:
def disable_character_entry(self, *, commit: bool = False) -> bool:
return self._maybe_commit(self.set_parameter(0x12, 0), commit)

def set_key_scan_duration(self, value: int, *, commit: bool = False) -> bool:
Expand Down