Page 1 of 1

[kovarex] [0.17.52] Can't type key when set as Focus Item Search hotkey

Posted: Fri Jun 28, 2019 11:05 pm
by skraaaaa
When I was on the User Login screen, when typing my password the field would not enter the 'F' key. The 'F' key is set to focus item search. I changed it to 'H', and the same problem happens when set to H.

It's not just the user login, it appears to be all textboxes.

EDIT: Applies to these textboxes:
-User login, both username and password
-Controls settings search

Version: [0.17.52]
Log: https://pastebin.com/6NGLb290

Re: [0.17.52] Can't type key when set as Focus Item Search hotkey

Posted: Fri Jun 28, 2019 11:47 pm
by Loewchen
You mean you changed the shortcut from ctrl+F to just F?

Re: [0.17.52] Can't type key when set as Focus Item Search hotkey

Posted: Sat Jun 29, 2019 1:04 am
by skraaaaa
Yes, exactly. I often hit 'E', 'F' to search the crafting menu for what I need. Making it 'F' instead of 'Ctrl + F' makes it easier.

Re: [0.17.52] Can't type key when set as Focus Item Search hotkey

Posted: Sat Jun 29, 2019 9:56 am
by Loewchen
How would the game know your intention of pressing F is to type the letter and not move focus to the search when you specifically set it to do the latter?

Re: [0.17.52] Can't type key when set as Focus Item Search hotkey

Posted: Sat Jun 29, 2019 2:21 pm
by tehfreek
If you're already in an editbox where the key isn't filtered then it should be handled by the editbox.

Re: [0.17.52] Can't type key when set as Focus Item Search hotkey

Posted: Sat Jun 29, 2019 5:26 pm
by skraaaaa
This. If I press W, A, S, or D when keyboard focus is on an edit box, my character doesn't move. Similarly when I press F the game should not interpret it as 'Focus Item Search'.

Also, I've quickly realized it's not all textboxes that have this problem, but the ones that do are:
-User login, both username and password
-Controls settings search

Re: [0.17.52] Can't type key when set as Focus Item Search hotkey

Posted: Sun Jun 30, 2019 1:52 am
by Impatient
Maybe this isn't a bug and the devs might be inclined to reply "It works as intended" but when the engine behaves as skraaaaa describes, it lacks consitency amongst the text input fields and/or keys bound to functions.

It certainly is great, that factorio offers to use any key and key combination. But offering to bind a key with a char that can be put into a text field, but is not handled by the focused text field then, does not make any sense. If the engine does not fully delegate input handling to the text field, as a user, I would like these key/char pairs to be unselectable in the key settings.

Re: [kovarex] [0.17.52] Can't type key when set as Focus Item Search hotkey

Posted: Thu Jul 04, 2019 12:56 pm
by kovarex
Thanks for the report.
We have a mechanism called "Input Blocker" which generally "protects" global events being fired if there is an focused textbox that could use that event for writing/editing. (The typical usecase is don't move left when writing "w" into the console).
When this mechanism was created we weren't probably that sure of how widely it will be needed, so the type of input block on textbox was none by default, and was set manually in the code case by case (AlphaNumerical/NumericalOnly etc.)

This lead to a case, where some of the textboxes just didn't have the block type defined as the people just forget to do it.

To solve this issue, every textbox now has the alphanumeric blocker active by default, and numeric by default if the textbox is set to accept only numeric input.

This solves the issue, so hainvg F bound to focus search doesn't prevent writing f in any of the text-boxes. (And it also work when you bind "1" to focus search and want to write to numeric text boxes, but doesn't prevent using f to focus search when writing to numerical text boxes).

TL;DR; Fixed for the next release of 0.17.55