Fix #1703
This commit is contained in:
@@ -15,10 +15,14 @@ if is_macos:
|
|||||||
def get_key_name_lookup():
|
def get_key_name_lookup():
|
||||||
return null_lookup
|
return null_lookup
|
||||||
else:
|
else:
|
||||||
|
|
||||||
def load_libxkb_lookup():
|
def load_libxkb_lookup():
|
||||||
import ctypes
|
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 = lib.xkb_keysym_from_name
|
||||||
f.argtypes = [ctypes.c_char_p, ctypes.c_int]
|
f.argtypes = [ctypes.c_char_p, ctypes.c_int]
|
||||||
f.restype = ctypes.c_int
|
f.restype = ctypes.c_int
|
||||||
|
|||||||
Reference in New Issue
Block a user