1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-06 17:41:04 +00:00

Formspec: change tabs with ctrl(+shift)+tab (#16167)

This change makes it easier to go to the next/previous tab using keyboard controls.
This commit is contained in:
siliconsniffer 2025-06-07 14:41:29 +02:00 committed by GitHub
parent fde6384a09
commit 4454d71d7d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 28 additions and 1 deletions

View file

@ -831,8 +831,10 @@ bool GUITable::OnEvent(const SEvent &event)
return true;
}
else if (event.KeyInput.Key == KEY_ESCAPE ||
event.KeyInput.Key == KEY_SPACE) {
event.KeyInput.Key == KEY_SPACE ||
(event.KeyInput.Key == KEY_TAB && event.KeyInput.Control)) {
// pass to parent
return IGUIElement::OnEvent(event);
}
else if (event.KeyInput.PressedDown && event.KeyInput.Char) {
// change selection based on text as it is typed