legacyclonk / LegacyClonk

The LegacyClonk engine and the c4group command line tool.
https://clonkspot.org/lc-en
Other
81 stars 18 forks source link

Change the focus to the searchbar when you select a scenario in start game or start new game in network #112

Open Danghorx opened 10 months ago

Danghorx commented 10 months ago

See title.

In CR there was only the option to press a button like "W" to search a specific scenario or folder fast. For example this would jump to WagonFight. But it is also a problem when you have 50 scenarios with the same letter. You have to press 50 times if the last scenario is the correct one. Or you could use the mouse in combination with "W" to scroll down for your desired scenario. So you use 1 Hand on the keyboard and 1 hand on the mouse for searching in CR. In LC there is the new feature with the searchbar. It allows to search specific scenarios like "Wipffight" when you type it in the search bar, or you can search only with "W". This displays all scenarios or folders that contain the letter "W". You probably type "Wipffight" with 2 hands so you dont use the mouse. The problem with this method is that you need the mouse first to select the searchbar, then type it in and then you could use enter or grab the mouse again and click on the scenario to select it and start it.

So what do you think? I will make a poll on the discord regarding this issue.

Somebodyisnobody commented 10 months ago

I see no argument against it. It would be intuitive.

maxmitti commented 10 months ago

The problem with this method is that you need the mouse first to select the searchbar […]

Actually you can just press Ctrl+F or Shift+Tab to focus the search field.

Danghorx commented 10 months ago

Interessting, but it would be better if you only have to press tab and it changes to the searchbar instead of to back. Shift + Tab is not easily reachable, you have to move your mouse from asdf. Ctrl + F is also a bit uhh.

Fulgen301 commented 10 months ago

Ctrl + F is also a bit uhh.

"a bit uhh"? It's also been the commonly shortcut for search for over a decade.

Danghorx commented 10 months ago

Never used it. Feels bad to use it.

RoboClonk commented 10 months ago

How about spacebar to focus search? It's easily accessible and shouldn't be used by something else

Somebodyisnobody commented 10 months ago

How about any key to focus the search bar? It's even more easily accessible and i haven't heard anything against it...

RoboClonk commented 10 months ago

You could use any key except letters since they might be used as accelerator keys

Remus76 commented 10 months ago

As long as you don't use up/down/left/right too because they allow a very fast navigation if you are used to the folder structure and it doesn't contain a (very) lot of scenarios. That would also be broken when you set focus on the searchbar by default so it should be a key or combination used for that. Actually Ctrl+F is the first combination for search in many applications.

Fulgen301 commented 10 months ago

We could give the search bar hotkey a name so that people could reconfigure it with a KeyConfig.txt if they don't like that hotkey.

It's even more easily accessible and i haven't heard anything against it...

Consistency. Almost all programs these days use Ctrl+F for search, and so does LC. The proposals I've seen here so far are

all of which are ignoring the question of whether focusing the search bar should eat that key or paste it into the search bar, and I still haven't seen any argument as to why either of those behaviors would be a good thing and less irritating than the current behavior, which is consistent with the landscape of programs out there. Ctrl+F is intuitive. Selecting list elements by pressing the key matching their first character is common behavior throughout many list controls. Why should we change that? Why should we add custom behavior not matching any other UI component, not only in Clonk, which has other search fields and lists too, but in other programs, and how would that help the users and not massively confuse them?

Danghorx commented 10 months ago

Another option would be to change the order in which you select the UI with Tabulator. So you just press Tab to select the searchbar. At the moment is toggles through all the options at the bottom. This includes, back, Internet, Liga, Password, Comment, etc.. So you have to press 10 times Tab to select the searchbar or use SHIFT + TAB....

Danghorx commented 8 months ago

Here are the results of the poll: https://i.imgur.com/YhjARmD.png