diff --git a/asus_touchpad.py b/asus_touchpad.py index 3946e5c..b5a0138 100755 --- a/asus_touchpad.py +++ b/asus_touchpad.py @@ -544,17 +544,14 @@ def get_system_numlock(): if not dev_k: return None - for event in dev_k.read_loop(): - if event.code == EV_KEY.KEY_CAPSLOCK: - log.info(event) - #leds_k = dev_k.leds(verbose=True) + leds_k = dev_k.leds(verbose=True) - #led_numl_list = list(filter(lambda x: 'LED_NUML' in x, leds_k)) + led_numl_list = list(filter(lambda x: 'LED_NUML' in x, leds_k)) - #if len(led_numl_list): - # return True - #else: - # return False + if len(led_numl_list): + return True + else: + return False def local_numlock_pressed():