In SX Microcontrollers, SX/B Compiler and SX-Key Tool, ALTITUDEAP wrote: Ok guys, Thanks for all the help thus far. I have used Bean's Code and also Sparks - R - Fun I cant get the desired results What i am trying to make it do::: If TheKey = LastKey loop until it does not As soon as it does not. Return the new value that does not match For instance.... if no key is pressed, TheKey will be 16 and will continue to be 16 while nothing is pressed. Now this is where it gets a little tricky As soon as a key is pressed. Lets say 3. The 'TheKey' value has changed but i dont want it to be returned until 'TheKey' = 16 again. meaning that the button was released. Any ideas on how this can be done? ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=151224#m153568 Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2006 (http://www.dotNetBB.com)