In some situations it appears that the SDL code causes issues (such as
crashes), even if the user isn't using SDL. This new setting is supposed
to help debugging this. A user can set main.sdlEnabled to "false", and
we won't initialize and use SDL.
This seems to be because on OSX entering or exiting fullscreen
interrupts keyboard input so we never get the release signal.
The solution here was to cancel any auto-repeat right before
we issue the fullscreen command. This was a better solution than
the additional delay I added first (which also happened to fix
the issue but was most likely prone to races).
Fixesplexinc/plex-media-player-private#489
Since the whole mapping is a JSON object there was no way to map a single key to multiple actions
since one would always be overwritten (keys are unique) this commit adds the possibility to map a
single key to multiple actions by allowing the value of the mapping to be a list of strings. This
can't be used for more complex long/short mappings just a single action list.
This allows us a bit more time to release the button before the auto-repeat events occur. This might fix some issues with events triggering to quickly.
This changes input dispatching quite a bit. Instead of immediately
dispatching all key input to both web and host, put all input through
web first. This gives web the chance to block certain input from
reaching host. For example, if you press "z" while you're in search, web
will stop propagating input, instead of letting host run the aspect
change command.
Autorepeat is now run on all input, regardless of whether it's mapped to
a host command or web.
There are some other subtle behavior changes.
For #315.
We can now express hold actions in a generic way in the input mappings.
This is done by mapping a input like this:
"A": { "short": "action1", "long": "action2" }
This is most useful for remote input. If a button has a long hold
action it will not auto repeat.
This commit refactors the way we handle button presses in our input
component, we now expect a button down and button up event. This is so
that we can internally handle auto-repeat instead of relying on the
input to handle it themselves.
This also lays the ground for long press detection and sequences.
slotWithArgs is a char*, and it's source, a QByteArray, is a temporary
object that gets destroyed after the auto statement. This left behind a
dangling pointer, which most likely was responsible for the issues we've
experienced.
Commit 0fb21d indeed did nothing.
The method name could simply not exist. Or what we had a lot in the
past, the Q_INVOKABLE marker on the method could have forgotten.
remapInput() is modified to avoid duplication of logic somewhat.
Removes the ugly if statement in KonvergoWindow and instead makes each
component call InputComponent::registerHostCommand() if they want to
handle a host command.