Commit Graph
33 Commits
Author SHA1 Message Date
Andrew Rabert 3ef86082bf Include command details in host command slot error 2025-12-06 13:15:35 -05:00
Andrew Rabert 00dfb70e1b Add MPRIS support 2025-11-23 16:19:09 -05:00
Andrew Rabert c7e9cf7486 Change to Qt 6
Co-authored by: Izzie Walton <ian@iwalton.com>
Co-authored by: Satadru Pramanik <satadru@gmail.com>
Co-authored by: sevenrats <sevenrats@tutanota.com>
Co-authored by: xB <65196493+xBiei@users.noreply.github.com>
Co-authored by: zjeffer <4633209+zjeffer@users.noreply.github.com>
2025-11-22 18:16:00 -05:00
Ian Walton 721e84f5b4 Switch from QsLog to regular QT logging. 2023-03-08 19:37:32 -05:00
Ian Walton 9fd786fdc0 Remove unused roku input and qhttp library. 2023-03-08 17:48:01 -05:00
Ian Walton b72c8084ab Initial try at taskbar-local. 2021-04-23 12:51:02 -04:00
Ian Walton b37f1ff539 Allow disabling autorepeat for bugged-out inputs. 2021-04-19 20:37:52 -04:00
Vincent Lang fc3094567f InputComponent: add a setting to disable SDL
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.
2018-02-07 20:35:44 +01:00
Matt Seeley bb81a04cfd Remove decreasing key repeat interval a constant tick
Use a fixed interval to emit key repeat events. This aligns with typical OS behavior. Time is based on empirical data. Data is included herein.

Towards: plexinc/konvergo-issues#188
Towards: plexinc/plex-media-player-private#498
2018-02-07 20:34:27 +01:00
Matt Seeley 1f9454dd6a Revert "Disable synthetic key repeat"
This reverts commit dd5142779650f4b2fe25f46c320052400212c201.
2018-02-07 20:34:27 +01:00
Matt Seeley 3f545aaad5 Disable synthetic key repeat 2018-02-07 20:32:50 +01:00
Vincent Lang 55cb138bdb InputComponent: clear all repeat state in cancelAutoRepeat
Also factor some minor duplicated code.
2017-02-15 13:29:19 +01:00
Vincent Lang 1bf4e4f1e7 InputComponent: log if slot invocation failed
Instead of silently ignoring it.
2016-09-29 15:03:52 +02:00
Tobias Hieta 91aa497bd4 Fix a bug where fullscreen setting could be auto-repeated
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).

Fixes plexinc/plex-media-player-private#489
2016-08-23 12:54:37 +02:00
Tobias Hieta 6e62e5a88a Allow keyinput to be mapped to a list of actions.
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.
2016-05-02 09:28:13 +02:00
Tobias Hieta 6421198a9f Add a system.hello() call that takes version as argument
This should be called by the web-client when everything is inited on the web-side. It allows the host to start sending input events over to it.
2016-04-29 11:33:16 +02:00
LongChair 40e52adc21 Input: Refactor up and down to use a state enum instead of a boolean
This makes it much more explicit in what's happening.
2016-04-28 16:08:28 +02:00
Tobias Hieta a0d9427ebe Increase the initial auto-repeat timer with 150msec
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.
2016-04-28 15:57:44 +02:00
Vincent Lang 1ed349579d New input dispatching
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.
2016-04-22 15:19:23 +02:00
Tobias Hieta 468a5e43f8 Make it possible to use InputComponent::registerHostCommand with a lambda instead of a Slot 2016-04-06 09:56:18 +02:00
Tobias Hieta a86ca1d4fa Map input to several actions
This allows multiple actions for one button to be sent to the web-client. Necessary for getting search to work properly

Fixes #214
2016-04-04 14:43:27 +02:00
Tobias Hieta 78bcff222d Use identifier-naming from clang-tidy and align all member names 2016-03-22 11:36:50 +01:00
Tobias Hieta 7f4202ff9c Clang-tidy fixups
Apply use-nullptr, simplify-boolean-expr and
inconsistent-declaration-parameter-name
2016-03-22 10:34:51 +01:00
Tobias Hieta 5b797f40ae Lower long hold timer to 500 2016-03-18 11:33:20 +01:00
Tobias Hieta 2c018529e1 Support for long hold actions.
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.
2016-03-18 11:26:00 +01:00
Tobias Hieta 8e664be211 Refactor the handling of button presses and handle autorepeat internally
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.
2016-03-18 11:26:00 +01:00
Tobias Hieta 732498a8d8 Add basic support for Roku HTTP protocol 2016-02-22 09:01:47 +01:00
Vincent Lang 9e6adf9163 Fix input command mapping issue
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.
2016-01-08 15:07:49 +01:00
Tobias Hieta f46a0124ef Better logging for received inputs.
Daniel requested that we get some more worthwhile logging in
InputComponent
2016-01-07 14:53:15 +01:00
Vincent Lang b20376eaa8 Avoid duplicate QMetaObject::invokeMethod() call
Both calls actually go to the same method, with the no-arguments one
just using a QGenericArgument(0) value as default argument.
2016-01-05 10:00:26 +01:00
Vincent Lang c6b683b9be Log error if registerHostCommand() maps to an unknown method
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.
2016-01-05 09:56:17 +01:00
Tobias Hieta 1fa34ec9aa Refactor host commands
Removes the ugly if statement in KonvergoWindow and instead makes each
component call InputComponent::registerHostCommand() if they want to
handle a host command.
2015-11-17 13:02:54 +01:00
Tobias Hieta 3d4859f1b1 Initial public commit of Plex Media Player 2015-10-13 11:05:27 +02:00