示例#1
0
def hid_enumerate():
    """
    Returns key values from each hid device found by hidapi.
    Find the output for your device if the product and vendor IDs don't work.
    Only works for OS X.
    """
    for d in hid.enumerate(0, 0):
        keys = d.keys()
        keys.sort()
示例#2
0
def hid_enumerate():
    """
    Returns key values from each hid device found by hidapi.
    Find the output for your device if the product and vendor IDs don't work.
    Only works for OS X.
    """
    for d in hid.enumerate(0, 0):
        keys = d.keys()
        keys.sort()
        for key in keys:
            print "%s : %s" % (key, d[key])
            print ""