Details
-
Suggestion
-
Resolution: Invalid
-
P4: Low
-
None
-
5.6.0 Beta
-
None
Description
IMHO we need some sort of "central" thing, where we can push events from different input devices (e.g. keyboard, remote control, gamepad, etc.) and these controls will use these events to do their stuff.
e.g.
@pragma Singleton
CentralNavigation {
signal up();
signal down();
signal left();
signal right();
signal pageUp();
signal pageDown();
/// etc etc
}
Then from keyboard, remote control, gamepad, etc. we emit these signals
RemoteControl { onKeyPressed: { switch(key) { case RemoteControl.KEY_UP: CentralNavigation.up(); break; case RemoteControl.KEY_VOL_UP: CentralNavigation.pageUp(); break; // etc. etc. } } }
similar thing will do the GamePad.
Instead of CentralNavigation.qml singleton we can make it an attached signals (similar with Keys), but we still need a way to push events from outside.
On which devices we'll need such a thing? Well on quite a few:
Android TVs - where the remote control is the only/most used input device.
Nvidia Shield like boxes - where the user expects to use gamepad and/or the remote control to control his apps.
other non-touch devices.