We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4cc7b8c commit 39432cbCopy full SHA for 39432cb
1 file changed
libraries/keyboard_layout.py
@@ -82,12 +82,15 @@ def keycodes(self, char):
82
keycodes('é')
83
"""
84
keycode = self._char_to_keycode(char)
85
- if keycode & self.SHIFT_FLAG:
86
- return (self.SHIFT_CODE, keycode & ~self.SHIFT_FLAG)
+ codes = []
87
if char in self.NEED_ALTGR:
88
- return (self.RIGHT_ALT_CODE, keycode)
+ codes.append(self.RIGHT_ALT_CODE)
+ if keycode & self.SHIFT_FLAG:
89
+ codes.extend((self.SHIFT_CODE, keycode & ~self.SHIFT_FLAG))
90
+ else:
91
+ codes.append(keycode)
92
- return (keycode,)
93
+ return codes
94
95
def _above128charval_to_keycode(self, char_val):
96
"""Return keycode for above 128 ascii codes.
0 commit comments