Skip to content

Commit 8e46bdd

Browse files
committed
test self.HIGHER_ASCII ord first, bump version
1 parent 2d20103 commit 8e46bdd

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

libraries/common/keyboard_layout.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"""
88

99

10-
__version__ = "2.0.0-auto.0"
10+
__version__ = "3.0.0-auto.0"
1111
__repo__ = "https://github.com/Neradoc/Circuitpython_Keyboard_Layouts.git"
1212

1313

@@ -109,10 +109,10 @@ def _above128char_to_keycode(self, char):
109109
:param char_val: ascii char value
110110
:return: keycode, with modifiers if needed
111111
"""
112-
if char in self.HIGHER_ASCII:
113-
return self.HIGHER_ASCII[char]
114112
if ord(char) in self.HIGHER_ASCII:
115113
return self.HIGHER_ASCII[ord(char)]
114+
if char in self.HIGHER_ASCII:
115+
return self.HIGHER_ASCII[char]
116116
return 0
117117

118118
def _char_to_keycode(self, char):

0 commit comments

Comments
 (0)