Commit graph

24 commits

Author SHA1 Message Date
Holger Kaelberer
30cffbd96e Add remotekeyboard plugin
BUG: 370919
REVIEW: 129727
2017-01-23 09:08:27 +01:00
Aleix Pol
c822ef8104 Set the device's announcedName when it's available
No need to block on it
2017-01-13 17:48:37 +01:00
Aleix Pol
a164983b6f Revert "kdeconnect-kde: Add remotekeyboard plugin"
This reverts commit 040ad7357b.

Sorry, didn't mean to push that myself ^^'
2017-01-11 17:20:22 +01:00
Holger Kaelberer
040ad7357b kdeconnect-kde: Add remotekeyboard plugin
Allow to inject keypress events to remote peers (most notably Android devices)

Notes / open issues / possible improvements:

- For the json-payload I used the syntax of the key-events as sent by mousepad-plugin with the addition of a "sendAck"-flag. If "sendAck" is set to true the remote peer should echo a key-event if it could be handled, thus allowing the local client to find out whether the key was accepted. For performance reasons, it's allowed to send multi-char strings in the "key" property (performs much better if you send a whole string via "echo '...' |  kdeconnect-cli ..." e.g.)

- kdeconnect-cli: For now takes a string and transforms it into single key-events for visible characters only. In a first implementation I used a kbhit() helper that used termios.h to catch and relay keypresses interactively (including some special-events), which was not optimal. A better approch might be to use linux input-api directly. Would this be an option regarding cross-platform compatibility or can I assume to develop for Linux only? Being a command-line guy, I'd really like to have a fully featured kdeconnect-cli interface ;-)

- Factor out the Qt::Key-to-internal keymap to some core-helper because it corresponds to the mapping in the mousepad-plugin?

- The plasmoid is not perfect as it is: A single line containing a non-echoing TextField (i.e. it eats all the KeyPress events), and only ack-ed keypress-packets from the peer device are injected if they contain visible keys. Advantage: the user sees whether his key-presses are accepted by the peer device. Disadvantage: The echoed text does not correspond 1:1 to what is shown on the peer's display, user might be confused when typing without success. I played around with different variations each of which with its proper shortcomings:
1. An echoing Textfield for typing: Has the advantage that the user can directly see what he is typing, which makes interaction in the typing field easier, BUT messes up interaction if the Editor on the peer is changed silently and does not notify the user if his keypresses are not handled by the peer.
2. A non-echoing TextField for typing PLUS a readonly one for printing visible echoed keys. Disadvantage: same as for the previous one and uses more space on the plasmoid.
Comments? Ideas?

REVIEW: 129727
BUG: 370919
2017-01-10 21:12:42 +01:00
Albert Vaca
3d0f7c3fcb Changed signal reachableStatusChanged() to reachableChanged(bool)
And proxied it on the C++ dbus interface.
2016-11-23 17:24:35 +01:00
Aleix Pol
6ece5665cd Expose nameChanged through dbus 2016-08-21 13:53:40 +02:00
Aleix Pol
596e4484f4 Clean up use of virtual and override keywords
Only use virtual when actually virtual, to override just use override.
2016-06-20 19:22:29 +02:00
Aleix Pol
bdff499965 Remote Commands plugin
Allows executing remote plugins from this client

Reviewed by Albert Vaca
2016-06-12 20:16:58 +02:00
Albert Vaca
0c95010c3b Merge branch 'master' into sslrefactor
# Conflicts:
#	core/device.cpp
#	interfaces/devicesmodel.cpp
2016-04-14 19:00:42 -07:00
David Kahles
12ccbaef98 Improve NotificationsModel
Don't refresh the whole notification list, if a notification is added or
removed.

REVIEW: 127565
2016-04-05 23:33:45 +02:00
Albert Vaca
cf6cbd2925 WIPx3! 2015-12-01 10:45:14 -08:00
Aleix Pol
50b9d331d1 Fix hack
Expose the signal on the exported interface.
2015-09-12 22:12:18 +02:00
David Edmundson
9985a59608 Find my phone plugin
Add a plugin that sends a package to ring an alarm on a phone

Also adjusts plasmoid to have a button to invoke this.
2015-09-11 21:12:12 +02:00
Aleix Pol
d58f6314fe run Clang Modernize
Minus the auto change
2015-09-08 10:47:37 +02:00
Boris Egorov
1924173df2 Fix various krazy2 warnings
Fix following krazy2 warning types:
[explicit], [endswithnewline], [doublequote_chars], [includes], [normalize],
[postfixop], [spelling]

See http://ebn.kde.org/krazy/reports/playground/base/kdeconnect-kde/index.html
for details.

SLOT/SIGNAL normalization done with Qt normalize utility:
https://github.com/qtproject/qtrepotools/tree/master/util/normalize

REVIEW: 124857
2015-08-21 22:38:54 +06:00
Aleix Pol
be2a3252c2 Make it possible to lock the screen from KDE Connect
Connects to freedesktop ScreenSaver interface and un/locks it upon request.

REVIEW: 124170
2015-07-22 03:37:34 +02:00
Aleix Pol
058f7c7c90 Implement the touchpad forwarding into kcapp
This way the computer's cursor can be controlled from the device. Keyboard
is not yet implemented.
2015-07-22 03:21:28 +02:00
Aleix Pol
06493a8192 Keep track of whether the daemon is alive
Listen to dbus registrations. Remove all devices if the service dies,
create all devices back when restored.
Same for the NotificationsModel.

REVIEW: 124183
2015-06-25 21:19:23 +02:00
Aleix Pol
6d83827b18 Don't rely on Q_PROPERTY if we're inheriting QDBusAbstractInterfaceBase
See bug:
https://bugreports.qt.io/browse/QTBUG-46858
2015-06-25 04:08:00 +02:00
Aleix Pol
43451d6ae1 Simplify Device::id management
Removes the id->row mapping. It was broken as the indices weren't updated
when a row was added or removed.
Stop exposing Device::id through dbus, just store it in the interface
class.
* It's redundant as it's part of the interface definition
* If we keep it it will save us quite some dbus round-trips
* It will be reliable, as nowadays id() sometimes QString() if the dbus
connection is invalid.

REVIEW: 124158
2015-06-24 20:57:17 +02:00
Aleix Pol
5c79e8a7a6 Implement an MPRIS client plugin
Makes it possible to control remote MPRIS instances.

REVIEW: 124100
2015-06-18 04:01:01 +02:00
Aleix Pol
7c2e2fb726 QML-ify
Add API to call random public plugin methods
qdbusxml2cpp is not generating the Q_PROPERTY attribute. For now [1], add
it ourselves by addding a proxy signal.

REVIEW: 124077
2015-06-13 01:28:36 +02:00
Albert Vaca
18ba161f17 Fully replaced KDED for autostart + dbus activation, so we work outside KDE 2015-02-23 22:12:45 -08:00
Aleix Pol
b88897847b Reorganize sources
We broke kded into core and kded, core contains the library with the backends
and plugins.
Also we renamed libkdeconnect to interfaces.
2014-06-14 15:22:40 +02:00
Renamed from libkdeconnect/dbusinterfaces.h (Browse further)