Unexpected hotkey triggers

Report problems with documented functionality
robodesign
Posts: 371
Joined: 30 Sep 2017, 03:59
Facebook: marius.sucan
GitHub: mariussucan
Location: Romania
Contact:

Unexpected hotkey triggers

Post by robodesign » 21 Jan 2018, 07:34

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.
-------------------------
KeyPress OSD v4: GitHub or forum. (presentation video)
My home page.
lexikos
Posts: 6175
Joined: 30 Sep 2013, 04:07
GitHub: Lexikos

Re: Unexpected hotkey triggers

Post by lexikos » 22 Jan 2018, 04:36

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.
Post Reply

Return to “Bug Reports”