Need help to find a way to detect key held down

Place to get help with not working mods / modding interface.
Bizz Keryear
Long Handed Inserter
Long Handed Inserter
Posts: 91
Joined: Thu Oct 22, 2015 5:08 am
Contact:

Need help to find a way to detect key held down

Post 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?
Last edited by Bizz Keryear on Tue Jul 05, 2016 2:30 pm, edited 1 time in total.
Bizz Keryear
Long Handed Inserter
Long Handed Inserter
Posts: 91
Joined: Thu Oct 22, 2015 5:08 am
Contact:

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

Post by Bizz Keryear »

*push again*
Post Reply

Return to “Modding help”