Hi! | I have this function to wait for a key, but after I press one of the keys in the row it reads, keep returning the value of key2 instead of reinitializing it and waiting for another key press. What did I do wrong? It seems that the while loop will never be executed. key2 is 0xFF at first, therefore key2&0xFF is 0xFF as well, and !0xFF is, of course, 0 (or false). Bye, Sebastian Reichelt