Advertisement
Ham62

Win32KeyStateTest.bas

Oct 30th, 2019
1,588
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include "windows.bi"
  2.  
  3. dim as uByte keys(256)
  4.  
  5.  
  6. do
  7.     locate 1,1
  8.    
  9.     GetKeyState(VK_SHIFT)   ' comment out and no updates??
  10.     var iResult = GetKeyboardState(@keys(0))
  11.      
  12.     if iResult = 0 then
  13.         print "call error"
  14.         system
  15.     elseif @keys(0) = NULL then
  16.         print "null ptr"
  17.         system
  18.     end if
  19.      
  20.     print "no Errors"
  21.      
  22.     for i as integer = 0 to 256
  23.         print keys(i); " ";
  24.     next i
  25. loop until multikey(1)
  26. sleep
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement