Show differencesHistory of post edits
Posted 12 January 2013 - 02:40 PM
If you AND '&' this value with one of the elements in the keyboardState array the resulting value is 0x80 as well in case the key is down.
If this bit is the only bit used, simply checking whether keyboardState is non-zero should work as well, but don't rely on this as other bits may be used for other purposes.
Posted 12 January 2013 - 02:35 PM
0x80 is the high bit of an 8 bit integer (10000000). This bit is set when the key is down.