|
open "Hook test" for text as #w struct kbhs, vkCode as ulong, scanCode as ulong, _ flags as ulong, time as ulong callback lpfnHook, KeyboardLLHook(long, ulong, ulong), long calldll #user32, "SetWindowsHookExA", _ _WH_KEYBOARD_LL as long, _ lpfnHook as ulong, _ 0 as long, _ 0 as long, _ hHook as ulong wait function KeyboardLLHook(lMsg, wParam, lParam) kbhs.struct = lParam if wParam=256 print chr$(kbhs.vkCode.struct); end function
!*key 1 "Hello world!|M" do input r$ loop until 0