Skip to content

Commit

Permalink
Merge pull request #1 from CharaChorder/patch-1
Browse files Browse the repository at this point in the history
Fix small stuff
  • Loading branch information
Raymo111 committed Jul 3, 2024
2 parents 16df8fc + 497ff55 commit 8f33beb
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 7 deletions.
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 @@ -262,7 +262,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 @@ -335,7 +335,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 @@ -472,10 +472,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

0 comments on commit 8f33beb

Please sign in to comment.