You can use ord() function in Python for that. For example, if you want to trigger 'a' key press, do as follows: if y(33) == ord('a'): print "pressed a" See a sample code here: Drawing Histogram. UPDATE: To find the key value for any key is to print the key value using a simple script as follows.
Nettbank og mobilbank. Nettbank Privat - logg inn eller bestill; Basistjenesten - for deg under 15 år; Mobilbank; Nordea ID; Apple Pay; Google Pay; Samsung Pay; Betal med smarttilbehør; Nordea Wallet - din mobile lommebok; Kontakt og meldinger; BankID fra Nordea.