Skip to content

Commit

Permalink
Rename to has_altgr()
Browse files Browse the repository at this point in the history
engine/engine.py
engine/event.py
  • Loading branch information
ShikiOkasaka committed Apr 22, 2024
1 parent f26fc5f commit 0a613aa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions engine/engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -783,7 +783,7 @@ def _process_surrounding_text(self, e: Event) -> bool:

if (self.get_mode() == 'あ'
and (e.is_henkan() or e.is_muhenkan())
and not e.with_altgr()):
and not e.has_altgr()):
return self._process_replace(e)

text, pos = self.get_surrounding_string()
Expand Down Expand Up @@ -828,7 +828,7 @@ def _process_surrounding_text(self, e: Event) -> bool:
return False

yomi = ''
if e.with_altgr():
if e.has_altgr():
c = self.process_alt_graph(e)
if not c:
self.clear_roman()
Expand Down
2 changes: 1 addition & 1 deletion engine/event.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def __init__(self, controller: 'KeyboardController', keyval, keycode, state, mod
self.state = state
self.modifiers = modifiers

def with_altgr(self) -> bool:
def has_altgr(self) -> bool:
return bool(self.modifiers & ALT_R_BIT)

def is_release(self) -> bool:
Expand Down

0 comments on commit 0a613aa

Please sign in to comment.