Not logged inOpenClonk Forum
Up Topic General / Feedback and Ideas / Concept for Inventory Keyboard Navigation
- - By Happy Striker [at] Date 2016-01-18 00:10 Edited 2016-01-18 16:13
Hello everybody.

In an earlier feedback I was suggesting that the „E“ menu should be completely usable via keyboard commands. So I was thinking about this issue for a while now and have brought up some ideas:

Basically either the left or the right hand side of the menu is selected and has the focus. This can be highlighted with a border or simply a more intense colour. With the usage of the „WASD“ keys it shall be possible to move the cursor (selected item) to select the desired item. Using the „Shift“ key the item can then be pushed to the other side of the menu. A slight change is necessary then to the mouse usage of moving all items, which can be solved by pressing the „ALT“ key instead. So a single press on the „Shift“ key will move one item. Same goes with a single click. Either pressing „ALT + Shift“ or „ALT + left mouse key“ moves all selected items at once.
If it is not possible because the other container is full or any other reason, e.g. the container can not hold the desired item, there may be implemented a single red flash of the items background colour or something like that. This can also be applied to the normal mouse click gesture, because right now the menu systems lacks of any indication system.
To even further improve the clarity which items can be hold by the container (for example the furnace, which can not hold all possible items) it could be a solution to put some very transparent icons of the storable items to the menu, so that it is immediately visible to the player which items he can store in that very container. Inserting the matching objects then makes the transparent icon fully visible and shows the item count next to it.
Also for a limited container like a lorry there should be an item counter to show how many more ojects can be placed inside.

Back to the keyboard shortcuts. Only one side of the menu can be selected. If the very right end of the item list is approached the cursor shall move back to the first item or to the next row if there is any. Moving vertically between inventories or production slots is possible using "W" or "S".  To switch the menu sites simply use the „Q“ button which is a bit similar to the usage outside of the inventory menu to switch between recent items in the clonks inventory.
Using the straight of the mouse or the keys „ALT + W“ or „ALT + S“ can be used to switch between all possible containers on the selected side of the menu. Additionally to avoid cycling through all containers the usage of "ALT + <Number of Containers>" can be used to quickly jump to the desired container.
The numbers „1“, „2“, … „5“ can be used to switch the currently selected item with the one in the clonks inventory matching the pressed number. This makes it possible to quickly rearrange the clonks inventory. Additionally using the „Shift“ key and pressing the number makes it possible to move the item out of the clonks inventory and leaving an empty slot. The item gets then placed in the selected building or another appropriate container. If the Clonk itself is selected the item shall simply get dropped to the ground.
Moving all objects to other side is done by "ALT + A" or "ALT + D".

To create objects in a building also press the shift key (increase the number of items in the queue +1). The finished item the goes straight into the buildings own inventory. To indicate the progress of the production a little progress bar can be integrated below the craftable item. Activating the endless production works with „ALT + Shift“ Key. Also the „ALT“ Key has to be used then to activate the endless mode while using the mouse. Reducing the queued productions can be done via the „Delete“ key (decreases the queue -1). Aborting all queued items of the selected craftable object is done via "ALT + Delete".

So the above mentioned ideas could be a possible way of implementing that feature. Hopefully I managed to think about all possible interaction possibilities so that this suggestion can be used as a thought out concept.
Best regards, Happy Striker
Reply
Parent - - By Sven2 [us] Date 2016-01-18 03:15
Thanks, these are some good ideas for the controls. I think implementing GUI keyboard control is important because it's also a requirement for making Gamepad controls work again.

I kinda like the idea of using LeftShift to transfer items. If the other side is selected by default (which makes sense because you most likely want to interact on that side), It means you can e.g. stand in front of the container, press either "E" and then "Shift" a few times to collect from the container. That's very similar to pressing Shift outside to collect stuff. Also for me having the right hand on the keyboard, Shift is easier to press than Space.

On the other hand, I think the user would rather expect "Space" for confirmation of highlighted items. I think we should try out both (just assign the key twice for testing) and see which one feels better. Maybe even leave them assigned twice in the end if there are no collisions.

Concerning the ALT key: I would use CTRL instead. Iirc, there was some trouble on either Linux or Mac with ALT combinations being reserved for some system stuff. I would rather avoid the ALT key.

Using 1-5 to put stuff directly into the numbered inventory slots: This means we cannot use the number keys to directly select Tabs in the menu. I'm not sure which feature is more important. I would like to have a key to go directly to a tab rather than having to cycle through them.

Also, you didn't mention it but I guess W and S should be used to go up and down through different interactions? (e.g. go from inventory to production in producers and select through stuff like the various pump interactions)
Parent - - By Happy Striker [at] Date 2016-01-18 16:19

> On the other hand, I think the user would rather expect "Space" for confirmation of highlighted items. I think we should try out both (just assign the key twice for testing) and see which one feels better. Maybe even leave them assigned twice in the end if there are no collisions.


There may also be a simple switch integrated into the games settings to choose the prefered method.

> Concerning the ALT key: I would use CTRL instead. Iirc, there was some trouble on either Linux or Mac with ALT combinations being reserved for some system stuff. I would rather avoid the ALT key.


I can tell at least for OS X that "Ctrl + Left Mouseclick" is a bad choice because that is the systems shortcut for a right click. From personal experience with developing cross plattform webapps I can tell that the ALT is the one that this (at least in browsers) works best across operating systems.

> Using 1-5 to put stuff directly into the numbered inventory slots: This means we cannot use the number keys to directly select Tabs in the menu. I'm not sure which feature is more important. I would like to have a key to go directly to a tab rather than having to cycle through them.


Good point. I added the suggestion that this behaviour can be preserved with the combination of "ALT + <Number of the Container>".

> Also, you didn't mention it but I guess W and S should be used to go up and down through different interactions? (e.g. go from inventory to production in producers and select through stuff like the various pump interactions)


Thanks. I updated the concept with a matching sentence to include this.
Reply
Parent - By Clonkonaut [de] Date 2016-01-18 21:56

> There may also be a simple switch integrated into the games settings to choose the prefered method.


These are usually called 'key bindings' ;)
Reply
Parent - - By Marky [de] Date 2016-01-18 22:10
How would it work script-wise? An engine function that lets you simulate mouse clicks or hovers on GUI elements, and the GUI controller interprets the button presses?
Parent - By Sven2 [us] Date 2016-01-18 23:18
Good question. It would be convenient to just define it all in script. But because sizes are not known and the reaction to navigation keys (i.e. WASD keys) depends on the number of horizontal elements in a grid, I fear that at least item navigation within each page has to be done in the engine.

Navigation controls would be async, but still run through the queue to ensure quick keypresses are not swallowed or re-ordered because of sync versus async delays. It will result in a double control execution delay for e.g. the highlight info, but I don't think that's a big deal. The engine just needs information about which items are keyboard-selectable and which items belong to the same group so you can reach them with regular selection keys. Then it should be able to figure out item selections just from the nested GUI layouts.

Other stuff like selecting pages, switching between left and right view and item activation (Space or Shift) can just be handled in script.
Parent - By Pyrit Date 2016-01-18 20:01
Very nice concept and good explained. Your proposal sounds intuitive in many cases. I bet the menus would feel very snappy with it.
Up Topic General / Feedback and Ideas / Concept for Inventory Keyboard Navigation

Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill