Jump to content
Sign in to follow this  

What can cause HotkeySet to not capture the key?

Recommended Posts


What can cause HotkeySet to not capture the key?


I have these codes:

GLOBAL $CLOCK = TimerInit()
func SetTimeOut ($t)
    return( TimerDiff($CLOCK)-$PAUSE+$t )

func IsTimeOut ($t)
    return( ($t - TimerDiff($CLOCK) + $PAUSE) <= 0 )

func TogglePause ()
    local static $toggle = 0
    if $toggle=0 Then
        $toggle = TimerInit()
        while $toggle>0
            Print("PAUSED! Press {PAUSE} to continue.")
        $PAUSE += TimerDiff($toggle)
        $toggle = 0

func ABORT ()

HotKeySet( "{PAUSE}", "TogglePause" )
HotKeySet( "{END}",   "ABORT" )

It works flawlessly for minutes/hours.
Then all of a sudden, they don't work anymore. They do not capture "PAUSE" nor "END" keys. Sometimes, these will happen even within a few minutes. When this happens, I would randomly press keys on the keyboard and all of a sudden it works again.

Anything I am doing wrong?

The main codes never uses "PAUSE" or "END" keys; it also only uses ToolTip for message displays.

I am using Windows 8.1; sometimes I would notice my keyboard language would switch from English to Chinese. I could not tie that as a possible cause because when this HotKeySet problem happens, I could not switch to desktop to see if the Keyboard is set to Chinese.

Share this post

Link to post
Share on other sites

could it be that ctrl+right shift is shifting your keyboardsettings (incidentally that can happen when you touch your keys to quickly and by incident you hit ctrl+shift together)


thanks for the suggestion, I look at my codes if i have anything that sends those keys. True enough, somewhere, hidden in the deep dark corner, I have a line that sent shift down!


Share this post

Link to post
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
Sign in to follow this  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.