Arrow keys navigation between screens
Was suggested by hughdahand on OpenDesktop. Had no plans to implement it initally, but since it can improve usablity, I decided to give it a try.
This commit is contained in:
parent
1450e287a6
commit
10103295e5
1 changed files with 8 additions and 2 deletions
|
|
@ -376,7 +376,7 @@ Rectangle
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Keys.onTabPressed: {
|
function nextScreen() {
|
||||||
switch(root.state)
|
switch(root.state)
|
||||||
{
|
{
|
||||||
case "statePower":
|
case "statePower":
|
||||||
|
|
@ -392,7 +392,8 @@ Rectangle
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Keys.onBacktabPressed: {
|
|
||||||
|
function previousScreen() {
|
||||||
switch(root.state)
|
switch(root.state)
|
||||||
{
|
{
|
||||||
case "statePower":
|
case "statePower":
|
||||||
|
|
@ -408,5 +409,10 @@ Rectangle
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Keys.onTabPressed: nextScreen()
|
||||||
|
Keys.onBacktabPressed: previousScreen()
|
||||||
|
Keys.onLeftPressed: previousScreen()
|
||||||
|
Keys.onRightPressed: nextScreen()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue