Godot: Navigating Tabcontainer with keyboard/controller

Created on 14 Feb 2019  路  4Comments  路  Source: godotengine/godot

As far as I know, currently it is not builtin to switch tabs with keyboard/controller input.
However I think this is essential when you're developing a game that is meant to be played with a controller.

On top of that when you implement your own "hack" to enable this, you are still unable to move the focus above the tabcontainer without setting the corresponding Neighbour up for each tab.

I propose to map a shortcut for changing tabs to TAB and SHIFT-TAB (which should only happen if you're inside a tabcontainer with the focus).
It should be possible to enable the tabs to gain focus themselves, so they can be selected with ui_select.

My proposed key shortcut is currently used by ui_focus_next and ui_focus_prev actions by default.
I don't see a particular use case for these 2 anyway, because navigating with left,right, up and down keys is more intuitive than tabbing through all controls in order (but maybe they have their valid use cases and I just don't know them).

I would love to see this built into the engine.

confirmed enhancement editor usability

Most helpful comment

Ctrl + Tab / Ctrl + Shift + Tab is a more common shortcut for changing tabs.

All 4 comments

Ctrl + Tab / Ctrl + Shift + Tab is a more common shortcut for changing tabs.

This should be fixed if https://github.com/godotengine/godot/pull/26597 is merged.

I am having this issue too

I need to be able to navigate tabs with not just the keyboard but gamepads as well
there is no tab on gamepads and up,down,left,right is how ui is handled it console games.

I would suggest adding a focus neighbor for tab controls for tabs specifically

I'm also having this issue, can't use gamepads to navigate tabs.

Was this page helpful?
0 / 5 - 0 ratings