GetKeyboardState() problems/usage

What seems to be the correct means of using this function?

getState =‘user32’,‘GetKeyboardState’,[‘P’],‘N’)

byteGrid = 0.chr * 256 #for the 256 virtual keycodes

now, using changes some of the /000’s to /001’s

However, how might one call back what virtual codes (keys) were
It’d be nice to have the functionality of getState(68) => 1 or something
of the sort… 68 representing “D” of course in ascii.

Any ideas?


  • Mac