while true
keys.each {|k, v| print k.upcase if GetAsyncKeyState.call(v) & 0x01 ==
1 && GetAsyncKeyState.call(0x10) & 0x01 == 1}
keys.each {|k, v| print k.downcase if GetAsyncKeyState.call(v) & 0x01
== 1}
end
GetAsyncKeyState is representing Win32API.new(‘user32’,
‘GetAsyncKeyState’, [‘i’], ‘i’)
and keys represents a hash of scan code to virtual keycode conversions.
The problem occurs as seen by running this in a console… pressing “a”
too quickly results in no secondary “a”.
In short… it doesn’t pick up all the keyboard input unless you type at
1 letter per 3 seconds.
Any way to speed this up?
Regards,
- Mac