Unexpected hotkey triggers

Report problems with documented functionality
robodesign
Posts: 934
Joined: 30 Sep 2017, 03:59
Location: Romania
Contact:

Unexpected hotkey triggers

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)
Quick Picto Viewer: GitHub or forum.
AHK GDI+ expanded / compilation library (on GitHub)
My home page.
lexikos
Posts: 9583
Joined: 30 Sep 2013, 04:07
Contact:

Re: Unexpected hotkey triggers

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.

Return to “Bug Reports”

Who is online

Users browsing this forum: No registered users and 45 guests