예제 #1
0
def check_num_lock(*args):
    display = Xlib.display.Display()
    gkc = display.get_keyboard_control()
    if gkc.led_mask & 2 == 2:
        logging.warning('NumLock is on; your bindings may not work')
예제 #2
0
def check_num_lock(*args):
    display = Xlib.display.Display()
    gkc = display.get_keyboard_control()
    if gkc.led_mask & 2 == 2:
        print 'WARNING: NumLock is on; your bindings may not work.'