function GetKeyNB() as integer
dim as string key
key = inkey
select case len(key)
case 0
return 0
case 1
return key[0]
case 2
return key[0] + (key[1] shl 8)
end select
end function
It works great apart from it does not detect the F10 key. Do I need to do something to get this to work?
Since yesterday my laptop F10 key isn't working anymore. I runned system restore configuration and restored the system at the status of 1 week ago. I also tried to hit the key with another plugged in keybord, without success.
function GetKeyNB() as integer
dim as string key
key = inkey
select case len(key)
case 0
return 0
case 1
return key[0]
case 2
return key[0] + (key[1] shl 8)
end select
end function
dim key as integer 'add
Do
key = GetKeyNB
If key Then
'PrintKeyDetails(Hex(key)) 'remove
Print(Hex(key)) 'add
End If
Loop Until key = 27 ' ESC
I used your code and it works. F10 returns 44FF, F9 returns 43FF, etc. Probably the problem of the laptop?