Code: Select all
result$=iskeydown(ANY)
print (result$)
Code: Select all
result$=iskeydown(ANY)
print (result$)
How would multiple simultaneously pressed down keys get handled? One return value is not enough, you would need a state table.zylesea wrote:I think it would be great if iskeydown and waitkeydown would accept "any" as argument for any key and return the value of the pressed key accordingly.
I thought to keep it rather simple. Just wait for the very first key hit and report the value of that particular key. IMHO that would ease up things quite much as it would simplify things likejalih wrote:How would multiple simultaneously pressed down keys get handled? One return value is not enough, you would need a state table.zylesea wrote:I think it would be great if iskeydown and waitkeydown would accept "any" as argument for any key and return the value of the pressed key accordingly.
Code: Select all
Repeat
Wait(2)
If IsKeyDown("space")=True Then Break
If IsKeyDown("m")=True Then my_rquit=True
Until my_rquit=True
If my_rquit=True
p_mybuttons()
Else
p_6Stim()
EndIf
Code: Select all
mykey$=waitkeydown(ANY)
switch mykey$
case space: p_6Stim()
case m: p_mybottons()
default: p_mydefaultroutine()
endswitch
Code: Select all
- New: WaitKeyDown() and IsKeyDown() accept the magic word "ANY" now to check if any key is down or wait
for any key
Great!airsoftsoftwair wrote:Code: Select all
- New: WaitKeyDown() and IsKeyDown() accept the magic word "ANY" now to check if any key is down or wait for any key