Skip to content

Commit

Permalink
修复键盘无法按下常规按键的BUG
Browse files Browse the repository at this point in the history
  • Loading branch information
tignioj committed Dec 9, 2024
1 parent 1b632a8 commit 1042544
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions fightmapper/BaseFightMapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ def keydown(self, key):
"""
key = str(key).lower()
if hasattr(self.Key, key): self.kb_press(getattr(self.Key,key))
else: self.kb_press(key)
def keyup(self, key):
"""
抬起按键
Expand All @@ -171,6 +172,7 @@ def keyup(self, key):
"""
key = str(key).lower()
if hasattr(self.Key, key): self.kb_release(getattr(self.Key,key))
else: self.kb_release(key)
def keypress(self, key):
"""
按下后抬起
Expand All @@ -179,6 +181,7 @@ def keypress(self, key):
"""
key = str(key).lower()
if hasattr(self.Key, key): self.kb_press_and_release(getattr(self.Key,key))
else: self.kb_press_and_release(key)

def mousedown(self, button=None):
"""
Expand Down

0 comments on commit 1042544

Please sign in to comment.