Warning: Division by zero in /home/cuttterp/public_html/mambots/content/geshibot/geshi.class.php on line 2285
Warning: Division by zero in /home/cuttterp/public_html/mambots/content/geshibot/geshi.class.php on line 2285
Warning: Division by zero in /home/cuttterp/public_html/mambots/content/geshibot/geshi.class.php on line 2285
Warning: Division by zero in /home/cuttterp/public_html/mambots/content/geshibot/geshi.class.php on line 2285
Warning: Division by zero in /home/cuttterp/public_html/mambots/content/geshibot/geshi.class.php on line 2285
Warning: Division by zero in /home/cuttterp/public_html/mambots/content/geshibot/geshi.class.php on line 2285
Warning: Division by zero in /home/cuttterp/public_html/mambots/content/geshibot/geshi.class.php on line 2285
Warning: Division by zero in /home/cuttterp/public_html/mambots/content/geshibot/geshi.class.php on line 2285
| GetKeys() |
|
|
|
| Computers - Development | ||||||
| Written by Dave Thorup | ||||||
| Friday, 08 June 2007 | ||||||
|
I was looking for the Mac equivalent of the Windows GetAsyncKeyState() function so that I could check to see if certain keys were pressed when launching Bibble. I ran across a helpful post here that tells you how to do it using the GetKeys() function (scroll to the end to find the useful stuff). It looks like that was taken from an Apple example, SampleButtonPlugin , found here. This post is a bit technical and is mainly for my own future reference. Read on for more... Here is the relevant code listing: The Apple docs for GetKeys states the following:
I'm not sure where to find the virtual key code definitions so the easiest way to find the KeyMap that you're after is to just run the GetKeys function while holding down the keys that you're after and save the returned KeyMap. FYI, the KeyMap for the Shift key is 0x00000000, 0x01000000, 0x00000000, 0x00000000. Also, the function is noted as Legacy but it works. If anyone knows of a newer function that does the same thing then please let me know. Related Items: Add as favourites (88) | Quote this article on your site | Views: 743
Write Comment
Powered by AkoComment Tweaked Special Edition v.1.4.3 |
||||||
| Last Updated ( Friday, 08 June 2007 ) | ||||||
| Next > |
|---|







