GetKeyState could not detect three simultaneous keypresses with certain keys Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
william_ahk
Posts: 486
Joined: 03 Dec 2018, 20:02

GetKeyState could not detect three simultaneous keypresses with certain keys

18 Apr 2021, 20:54

I needed a triple keydown hotkey so I was trying GetKeyState(), but it seems it doesn't work with certain keys held down? For example the following:

Code: Select all

loop {
    ;only two keys will be detected as pressed when three of them are held down
    tooltip % "z: " GetKeyState("z", "P") " s: " GetKeyState("s", "P") " w: " GetKeyState("w", "P")
}
However other key combinations doesn't produce this issue:

Code: Select all

loop {
    ;all three keys will be detected as pressed when they are held down
    tooltip % "x: " GetKeyState("x", "P") " s: " GetKeyState("s", "P") " w: " GetKeyState("w", "P")
}
gregster
Posts: 9001
Joined: 30 Sep 2013, 06:48

Re: GetKeyState could not detect three simultaneous keypresses with certain keys  Topic is solved

19 Apr 2021, 01:13

Might be a (quite common) technical limitation of your keyboard (and generally many keyboards) - on all of my (admittedly very cheap) keyboards, there are certain 3+ key combos that won't work together, it's called jamming (although there are also other effects possible): compare https://en.wikipedia.org/wiki/Rollover_(key)

(But both key combinations from above work on my currently used keyboard.)

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: No registered users and 211 guests