Key values in Tweak platform-dependend?
Stefan
garak85 at gmx.de
Sun Jan 21 15:58:23 UTC 2007
Hi folks,
We are 3 students trying to implement a lil' game in Tweak. In doing so,
we have to catch keyboard events using a method like:
onKeyDown: event
| keyValue |
<on: keyDown>
keyValue := event keyValue.
Thereby the value of keyValue differs in dependency of the underlying
OS. On Windows the keyValue equals the ASCII-values ('A' = 65). On Mac
OS we get completely different values, e.g., an 'A' results in 0.
Currently we work around that problem by checking Smalltalk
platformName. Does someone know another (and better ;) ) way to resolve it?
Thanks for your help.
More information about the Squeak-dev
mailing list
|