dpressed = 0
def on_press(key):
if key == ('d'):
global dpressed
dpressed+=1
logging.info("D: %s" % dpressed)
When I run this code and press d, nothing happens, which I suspect is because the key needs to be called something else when checked. Does someone know what it should be?