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

This subforum contains all the issues which we already resolved.
credomane
Filter Inserter
Filter Inserter
Posts: 307
Joined: Tue Apr 12, 2016 6:21 pm
Contact:

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

Post 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. :(
User avatar
Klonan
Factorio Staff
Factorio Staff
Posts: 5267
Joined: Sun Jan 11, 2015 2:09 pm
Contact:

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

Post 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
credomane
Filter Inserter
Filter Inserter
Posts: 307
Joined: Tue Apr 12, 2016 6:21 pm
Contact:

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

Post 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.
User avatar
aubergine18
Smart Inserter
Smart Inserter
Posts: 1264
Joined: Fri Jul 22, 2016 8:51 pm
Contact:

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

Post by aubergine18 »

Is there a list of the key and modifier names that the game recognises in the `custom-input` prototypes?
Better forum search for modders: Enclose your search term in quotes, eg. "font_color" or "custom-input" - it prevents the forum search from splitting on hypens and underscores, resulting in much more accurate results.
credomane
Filter Inserter
Filter Inserter
Posts: 307
Joined: Tue Apr 12, 2016 6:21 pm
Contact:

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

Post 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
User avatar
aubergine18
Smart Inserter
Smart Inserter
Posts: 1264
Joined: Fri Jul 22, 2016 8:51 pm
Contact:

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

Post 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*.
Better forum search for modders: Enclose your search term in quotes, eg. "font_color" or "custom-input" - it prevents the forum search from splitting on hypens and underscores, resulting in much more accurate results.
Twinsen
Factorio Staff
Factorio Staff
Posts: 1348
Joined: Tue Sep 23, 2014 7:10 am
Contact:

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

Post 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
Post Reply

Return to “Resolved Problems and Bugs”