Page 1 of 1

game not register 'space' while held lshift+w

Posted: Mon Jan 29, 2024 5:40 am
by prostokiriuha
i have some weird bug witn input processing
if i held lshift+w and press space key event will just not fire
it does not relater to my project, i tried in new one and have same issue
here is a simple code to reproduce this bug
on screenshot i marked what keys i pressed together, and love.keypressed just not executing if i hold lshift+w
my game is 3d and this key combination maybe the most classical and crucial - held left shift to sprint and w to go forward and press space to - and it doesn't work
lshift + any other key + space works fine

Code: Select all

local FONT = love.graphics.newFont (18, 'mono')
local FONT_LIHE_H = FONT:getHeight ()
local LINES = {}

love.keypressed = function (key, code)
    if key == 'escape' then
        love.event.push ('quit')
        return
    end
    table.insert (LINES, string.format ('%06d\t\t%s\t\t%s', love.timer.getTime () * 1000, key, code))
end

love.update = function (dt)
    if #LINES > 25 then
        table.remove (LINES, 1)
    end
end

love.draw = function ()
    love.graphics.setFont (FONT)
    local line_h = FONT:getLineHeight ()
    local n = #LINES
    for i = 0, n - 1 do
        love.graphics.print (LINES [n - i], 20, 20 + FONT_LIHE_H * i)
    end
end

Re: game not register 'space' while held lshift+w

Posted: Mon Jan 29, 2024 3:27 pm
by BrotSagtMist
Your keyboard has a limit on how much keys it can use at once.
This is a hardware thing, just buy a better computer.

Posted: Mon Jan 29, 2024 9:18 pm
by prostokiriuha
hello
thx for reply
yes, us i found later its a keyboard issue
but it s not a amount of keys, but only this one specific conbination not works, and not only by mine instance, but on this specific keyboard model - i managed to test it on 2 more same keyboards
on keyboard of another model it works
sry for bothering

Re: game not register 'space' while held lshift+w

Posted: Mon Jan 29, 2024 9:19 pm
by prostokiriuha
"just buy a better computer."
salty, dude

Re: game not register 'space' while held lshift+w

Posted: Mon Jan 29, 2024 9:40 pm
by BrotSagtMist
I am bread, i need salt.
German humor, there where wars over it.

In anycase this is called key rollover and you keyboard has a 2 key limit meaning they only guarantee up to 2 keys working.
Some 3 ones may work, but not all.
Usually modern keyboards have a 3 key guarantee. Good ones have no limit.
Thus: Its just cheap hardware.
Also dont rely on this working for anyone else either.

Re: game not register 'space' while held lshift+w

Posted: Tue Jan 30, 2024 12:29 am
by prostokiriuha
yes, as i found now, there r few more combinations where 'w' key present and some other key not working.
but i never before played with this keyboard, this one for typing only, so i only now noticed ths issue.
so yeah, maybe i need a better one.
also good to know this is not an annoing unfixable bug.

Re: game not register 'space' while held lshift+w

Posted: Thu Feb 01, 2024 1:11 pm
by pgimeno