A naso, potresti inserire in un evento Timer, con intervallo settato a (esempio) 100 millisecondi un codice che utilizzi la API GetAsyncKeyState del tipo:

codice:
Static Counter as Integer = 0

if GetAsyncKeyState(Codice Tasto) then
   Counter + = 1
else
   'tasto sollevato
   If counter > 30 then
       --------------
   elseIf counter > 20 then
       --------------
   End If
   'azzero il counter
   Counter = 0
 End If