Fix #1703
This commit is contained in:
parent
0fafc07db0
commit
9da095ca50
1 changed files with 6 additions and 2 deletions
|
|
@ -15,10 +15,14 @@ def null_lookup(name, case_sensitive=False):
|
|||
def get_key_name_lookup():
|
||||
return null_lookup
|
||||
else:
|
||||
|
||||
def load_libxkb_lookup():
|
||||
import ctypes
|
||||
lib = ctypes.CDLL('libxkbcommon.so')
|
||||
for suffix in ('.0', ''):
|
||||
try:
|
||||
lib = ctypes.CDLL('libxkbcommon.so' + suffix)
|
||||
break
|
||||
except Exception:
|
||||
pass
|
||||
f = lib.xkb_keysym_from_name
|
||||
f.argtypes = [ctypes.c_char_p, ctypes.c_int]
|
||||
f.restype = ctypes.c_int
|
||||
|
|
|
|||
Loading…
Reference in a new issue