Jump to content

Strange key behaviour associated with HotKeySet?


 Share

Recommended Posts

I've written a script which works fine for blocking attempts to use printscreen to capture data. It also provides a means of overiding the blocked printscreen. 50 users have this installed and all was ok with the printscreen blocking but 3-4 times a week various people called me to say that various keys on their keyboards have ceased responding, like R, S,T and E. Changing program focus and returning to the original application seemed to resolve this. It took me a few weeks of dabbling to find that by disabling my autoit script these problems have gone away.

Is there an issue with using HotKeySet in this way that may cause other keys to go to sleep?

$catch = ""

Opt("TrayIconHide", 1)

HotKeySet("{PRINTSCREEN}","NoChanceMatey")

HotKeySet("^{PRINTSCREEN}","NoChanceMatey")

HotKeySet("!{PRINTSCREEN}","NoChanceMatey")

HotKeySet("+{PRINTSCREEN}","NoChanceMatey")

HotKeySet("!+{PRINTSCREEN}","NoChanceMatey")

HotKeySet("^!{PRINTSCREEN}","NoChanceMatey")

HotKeySet("^+{PRINTSCREEN}","NoChanceMatey")

HotKeySet("^!+{PRINTSCREEN}","NoChanceMatey")

HotKeySet("#{PRINTSCREEN}","SecretOption")

HotKeySet("#!{PRINTSCREEN}","NoChanceMatey")

HotKeySet("#^{PRINTSCREEN}","NoChanceMatey")

HotKeySet("#!+{PRINTSCREEN}","NoChanceMatey")

HotKeySet("#+{PRINTSCREEN}","NoChanceMatey")

HotKeySet("#+^{PRINTSCREEN}","NoChanceMatey")

HotKeySet("#!+^{PRINTSCREEN}","NoChanceMatey")

do

sleep(1000)

until 0

func NoChanceMatey()

if $catch <> "Allowed" then

Send("#l")

endif

endfunc

func SecretOption()

$passwd = InputBox("Security Check", "Enter your password.", "", "*")

if $passwd = "override" Then

$catch = "Allowed"

EndIf

EndFunc

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...