Page 1 of 1

[0.14.8][Twinsen] Control UI accepts key but won't fire mod event.

Posted: Fri Sep 23, 2016 3:13 am
by credomane
The PRINTSCREEN button is a valid recognized key by Factorio in the controls UI but pressing the key will never trigger the script event.

If you change the mod key from PRINTSCREEN to F12, for example the script event triggers when F12 is pressed.
Use the controls UI to change it back to PRINTSCREEN and the script event won't trigger anymore.

Really want to make that the shortcut-key for a screenshot mod. :(

Re: [0.14.8] Control UI accepts key but won't fire mod event.

Posted: Fri Sep 23, 2016 12:36 pm
by Klonan
Thanks for the report,

I can confirm it isn't just a mod issue,
I rebinded a key to 'PRINTSCREEN',
But then pressing printscreen doesn't activate that key in the game

Image

Re: [0.14.8] Control UI accepts key but won't fire mod event.

Posted: Fri Sep 23, 2016 7:12 pm
by credomane
I haven't gone testing all the keys on the keyboard just yet but some of the other "odd" keys might also suffer the same problem.

"Scroll Lock", "Pause/Break", "Insert", "Home", Delete", "End", "Page Up", and "Page Down" are the "odd" keys I referred too.

I'll test every key on my 104 Key keyboard tonight. See if there are any others.

Re: [0.14.8] Control UI accepts key but won't fire mod event.

Posted: Fri Sep 23, 2016 8:22 pm
by aubergine18
Is there a list of the key and modifier names that the game recognises in the `custom-input` prototypes?

Re: [0.14.8] Control UI accepts key but won't fire mod event.

Posted: Fri Sep 23, 2016 11:43 pm
by credomane
Seems PRINTSCREEN is the only key on my 104 US keyboard that did not work.

aubergine18 wrote:Is there a list of the key and modifier names that the game recognises in the `custom-input` prototypes?
I just try assigning a key to something. Whatever you see there is exactly what you need to put as the hotkey in your mod. Then I the key I changed I change back.

The only exception being the mouse buttons. Those are all mouse-button-X where X is a number

1 is left click
2 is right click
3 is middle click
Then if your mouse is like mine you will have a 4 and 5 too.

Mouse Wheel Up is mouse-wheel-up....I think.
Mouse Wheel Down is mouse-wheel-down...I think again. :P

Re: [0.14.8] Control UI accepts key but won't fire mod event.

Posted: Sat Sep 24, 2016 12:19 am
by aubergine18
Thanks for infos, particularly about mouse stuff!

As for testing other keys, I'm a bit limited because I'm on a Mac and it has a rather strange keyboard: No 'Del' key, no "PrtScr" key, etc. I can probably get those keys using shortcuts, but even the the game would probably show the shortcut and not the shortcut that results from the shortcut *brain explodes*.

Re: [0.14.8][Twinsen] Control UI accepts key but won't fire mod event.

Posted: Fri Oct 21, 2016 12:41 pm
by Twinsen
For some reason Windows does not send key-down events for PRINTSCREEN or SCROLLLOCK.
I made a special case that will trigger events for those keys on key-up instead of key-down.

Fixed in Version: 0.14.15