Essentially, when a boolean is pressed a corresponding number should be generated, this buttons are set to switch until released, and the event structure reads the boolean state on mouse up, at this point a value should be generated from 0-9 depending on which boolean is pressed. However on some presses of the booleans the value produced is 0, this is fine for the button corresponding to 0, however for the values 1-9 this is wrong. Any ideas on why this is and how I could fix it would be great?