[Gambas-user] How to detect Capslock
Stefano Palmeri
rospolosco at ...152...
Sun Feb 8 15:43:10 CET 2009
Il domenica 8 febbraio 2009 04:56:09 richard terry ha scritto:
> I wondered how one could detect if the capslock key was on.
>
> Any help appreciated.
>
> Richard
>
Try this:
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
PUBLIC SUB Main()
DIM sShellOutput AS String
DIM iKeyLocks AS Integer
SHELL "xset q | grep 'LED mask:' | grep -o 0000000." TO sShellOutput
iKeyLocks = Val(sShellOutput)
SELECT iKeyLocks
CASE 1
PRINT "Caps Lock is ON"
CASE 2
PRINT "Num Lock is ON"
CASE 3
PRINT "Caps Lock is ON"
PRINT "Num Lock is ON"
END SELECT
END
'''''''''''''''''''''''''''''''''''''''''''''''''''''''
Saluti,
Stefano Palmeri
> ---------------------------------------------------------------------------
>--- Create and Deploy Rich Internet Apps outside the browser with
> Adobe(R)AIR(TM) software. With Adobe AIR, Ajax developers can use existing
> skills and code to build responsive, highly engaging applications that
> combine the power of local resources and data with the reach of the web.
> Download the Adobe AIR SDK and Ajax docs to start building applications
> today-http://p.sf.net/sfu/adobe-com
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
More information about the User
mailing list