Page 1 of 1

Need help to find a way to detect key held down

Posted: Sat Jul 02, 2016 8:02 pm
by Bizz Keryear
I want to create a mod that reacts to an key input ... but I have no clue how to achieve it... anyone any idea?
(need to grab a key press event)


Made a lot of progress .. thanks to other mods I analysed.

One gave me the hint how to add my own key events ... (namely: https://mods.factorio.com/mods/GotLag/S ... erters)
I that tried it myself, but ... http://pastebin.com/SM4iZZyH does not work as intended ... only my last key gets acknowledged


Made even more progress

http://pastebin.com/i4qVz1GQ toggles on my custom key ... but I need to change when held down (and back when released) but no clue how to do.

If I need a custom event ... I can't make heads or tails out of https://wiki.factorio.com/index.php?tit ... tom_Events ... need at least a practical example to understand it seems. (sorry for being stupid)


So done! Mod has been released (viewtopic.php?f=97&t=28279)... still suffers from not being able to detect a held down key. Anyone any idea how to work around that? Shall I redefine all movement directions?

Re: Need help to find a way to detect key held down

Posted: Tue Jul 05, 2016 2:32 pm
by Bizz Keryear
*push again*