Page 1 of 1

Unexpected hotkey triggers

Posted: 21 Jan 2018, 07:34
by robodesign
Hello!

I think there's a bug causing unexpected Hotkeys to trigger. In the following code:

Code: Select all

    Hotkey, ~^vk5A, OnCtrlAction, useErrorLevel
    Hotkey, ~^vk5A Up, OnCtrlZup, useErrorLevel

    Loop, 256
    {
        k := A_Index
        code := Format("{:x}", k)
        n := GetKeyName("vk" code)

        if (n = " ") || (n = "") || (StrLen(n)>1)
           continue

        Hotkey, % "~*vk" code, OnLetterPressed, useErrorLevel
        Hotkey, % "~+vk" code, OnLetterPressed, useErrorLevel
        Hotkey, % "~^!vk" code, OnLetterPressed, useErrorLevel
        Hotkey, % "~<^>!vk" code, OnLetterPressed, useErrorLevel
        Hotkey, % "~+^!vk" code, OnLetterPressed, useErrorLevel
        Hotkey, % "~+<^>!vk" code, OnLetterPressed, useErrorLevel
        Hotkey, % "~*vk" code " Up", OnLetterUp, useErrorLevel
        if (errorlevel!=0)
           soundbeep, 1900, 50
    }

When I press Shift+Z, what gets triggered is Ctrl+Z [~^vk5A Up]. Why? I suppose it's a bug.

It's even weirder, if you choose to bind to ~^vk41 after the loop, and you use the Igbo kbd layout. When you press A [with no shift], it gets triggered.

Thank you.

Best regards, Marius.

Re: Unexpected hotkey triggers

Posted: 22 Jan 2018, 04:36
by lexikos
When I press Shift+Z, ~+vk5a is triggered.

I think it is more likely to be caused by some other part of your script or something else on your system.