Commit graph

107 commits

Author SHA1 Message Date
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
Aleix Pol
7249f0b41e Show help upon error 2016-11-30 15:40:30 +01:00
Albert Vaca
60331ccbf1 Clazy says all this QStringLiteral and QLatin1String were missing/wrong 2016-11-26 16:21:29 +01:00
Albert Vaca
6aa058bfd4 Fixed kdeconnect-cli never reporting devices as paired 2016-11-23 17:20:59 +01:00
Aleix Pol
7d88340da7 Makes it possible to send sms from kdeconnect-cli
Summary: Introduces --send-sms and --destination

Test Plan: Sent an sms to Albert Vaca

Reviewers: #kde_connect, albertvaka

Reviewed By: #kde_connect, albertvaka

Differential Revision: https://phabricator.kde.org/D3252
2016-11-04 12:27:52 +01:00
Albert Vaca
1d7faabcdb Exit early if no device is specified. 2016-10-24 12:42:42 +02:00
Albert Vaca
0b3de33d74 Minor 2016-07-12 12:33:57 +02:00
Albert Vaca
e880e14ed5 Preffer Q_FOREACH to foreach 2016-06-21 14:50:17 +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
Aleix Pol
c7429b56b7 In the CLI interface, make it possible to refer a device by name
Only works with trusted devices
2016-06-06 01:21:37 +02:00
Aleix Pol
751bd5849b small style changes 2016-06-06 01:21:37 +02:00
Albert Vaca
82bc73dd9b WIPx2 2015-12-01 07:25:34 -08:00
Albert Vaca
16f9af908a WIP 2015-11-30 10:36:01 -08:00
Albert Vaca
30d2dd991b Merge branch 'master' into sslmaster 2015-11-30 03:40:07 -08:00
David Edmundson
7f794c093a Fixed the CLI
Enter discoverability mode if pairing with an unpaired device.

Use the correct isPaired. This exists as a method and a property,
callign the method returns QDbusPendingReply which shouldn't be checked
immediately
2015-09-12 22:08:12 +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
5e0a7a34b9 Merge branch 'master' into ssl
# Conflicts:
#	cli/kdeconnect-cli.cpp
#	core/backends/lan/landevicelink.cpp
#	core/backends/lan/landevicelink.h
#	core/backends/lan/lanlinkprovider.cpp
#	core/backends/lan/lanlinkprovider.h
#	core/backends/lan/socketlinereader.h
#	core/backends/lan/uploadjob.cpp
#	core/backends/lan/uploadjob.h
#	core/backends/loopback/loopbackdevicelink.h
#	core/daemon.cpp
#	core/daemon.h
#	core/device.cpp
#	core/device.h
2015-09-11 17:25:23 +02:00
Albert Vaca
ea253b1755 Merge branch 'stable' 2015-09-11 04:35:41 -07:00
Albert Vaca
825a02f76a Fixed compilation error because QCA doesn't include QIODevice 2015-09-11 04:35:22 -07:00
Aleix Pol
ca4a81b8e8 Merge branch 'stable' 2015-09-11 12:24:15 +02:00
Aleix Pol
67c5a2b5f1 Fix variable scope 2015-09-11 12:22:35 +02:00
Patrick von Reth
da5c9bd30e Fix compilation on Windows. 2015-09-10 15:51:38 +02:00
Aleix Pol
361fbbd81d Adapt kdeconnect-cli to changes in core 2015-09-09 23:22:59 +02:00
Vineet Garg
06d8b3c54e Merge branch 'master' into pairinghandler 2015-07-27 21:00:05 +05:30
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
Vineet Garg
eda2563d03 Fixed encryption info in cli 2015-07-19 20:25:28 +05:30
Vineet Garg
20e46418ba Encryption info in cli 2015-07-18 18:54:10 +05:30
Vineet Garg
8915d770b6 Relative file path sent as link in share in cli
Fixed it
2015-06-22 22:57:41 +05:30
Yuri Chornoivan
1ee846231d Fix typo 2015-03-20 10:07:34 +02:00
Aleix Pol
021bb1781a Fix kdeconnect-cli after DevicesModel refactoring
Can't use the model anymore as it is asynchronous, so just use the dbus
interfaces directly.
2015-03-16 02:58:22 +01:00
Albert Vaca
a3decd542c Includes cleanup 2015-03-13 21:20:58 -07:00
Albert Vaca
0cb24acbc0 Improved kdeconnect-cli, adding parameters to ease scripting.
Also:
Added some missing i18n calls.
Using QTextStream(stderr) instead of qCritical() to avoid "quoted output".
2015-02-24 22:17:44 -08:00
Albert Vaca
c013966f4b Version number is now set in a single place 2015-02-04 23:52:07 -08:00
Aleix Pol
5285b8b9c2 Drop Qt5::Gui requirement 2014-11-28 17:42:53 +01:00
Aleix Pol
233607d246 Fix build from broken merge 2014-11-12 12:58:25 +01:00
Albert Vaca
a58fab4fb3 Merge branch 'master' into frameworks
Conflicts:
	cli/kdeconnect-cli.cpp
	core/device.cpp
	core/filetransferjob.cpp
	core/filetransferjob.h
	core/networkpackage.h
	kded/CMakeLists.txt
	plugins/share/shareplugin.cpp
	plugins/telephony/telephonyplugin.cpp
2014-11-11 21:40:54 -08:00
Albert Vaca
b001d25a9a Added -d as shortuct for --device in kdeconnect-cli 2014-11-09 22:08:13 -08:00
Albert Vaca
8e3f8f42dc Using QTextStream instead of std::cout to print text to console
This way we add support for non-ascii chars

BUG: 340764
2014-11-09 17:14:53 -08:00
Aleix Pol
21ab5a4f81 Merge branch 'master' into frameworks
Mostly kDebug -> qCDebug
Also some KCmdLineArgs -> QCommandLineParser

Conflicts:
	cli/kdeconnect-cli.cpp
	core/CMakeLists.txt
	core/backends/lan/lanlinkprovider.cpp
	core/daemon.cpp
	core/pluginloader.cpp
	interfaces/CMakeLists.txt
	kio/kiokdeconnect.cpp
	plugins/mousepad/CMakeLists.txt
	plugins/mousepad/mousepadplugin.h
	plugins/mpriscontrol/mpriscontrolplugin.cpp
	plugins/sftp/sftpplugin.cpp
2014-11-04 19:12:29 +01:00
Albert Vaca
3814fff705 Added myself as author of kdeconnect-cli 2014-09-26 20:40:06 -07:00
Albert Vaca
f41fb4de2a Customizable ping messages. 2014-09-26 20:39:38 -07:00
Albert Vaca
2cffbedcd4 Added --refresh option to the CLI tool. 2014-09-26 19:22:46 +02:00
Aleix Pol
1abf0686f5 Port kdeconnect-cli away from kdelibs4supposrt 2014-09-22 02:26:06 +02:00
Àlex Fiestas
e96fe74b64 Remove unused include in kdeconenct-cli
We are not using KUrl.
2014-09-21 21:58:55 +02:00
Aleix Pol
a8fb015a22 Fix compilation after merge 2014-07-02 01:39:38 +02:00
Albert Vaca
a303b73238 Merge branch 'master' into frameworks
Conflicts:
	cli/kdeconnect-cli.cpp
	core/CMakeLists.txt
	plasmoid/package/contents/ui/FullRepresentation.qml
	plugins/ping/pingplugin.cpp
2014-07-01 23:59:38 +02:00
Albert Vaca
4ef2a07f7b CLI can now list notifications from a device 2014-07-01 01:26:07 +02:00
Aleix Pol
c8dbbed685 Move the send ping code to the ping plugin
turn it into a dbus call to the plugin

Reviewed by Albert Vaca
2014-06-27 18:21:40 +02:00
Aleix Pol
db0d30e2e9 When listing from the cli, display if a device is paired. 2014-06-27 16:18:43 +02:00
Aleix Pol
02e18a9759 Extend kdeconnect-cli
Make it show whether devices are paired.
Let it un/pair devices.

Reviewed by Albert Vaca
2014-06-23 18:15:10 +02:00
Aleix Pol
b618a64f51 Merge remote-tracking branch 'origin/master' into frameworks
Conflicts:
	cli/kdeconnect-cli.cpp
2014-06-18 02:46:14 +02:00
Aleix Pol
bf272ea3e7 Remove usage of KDE4_ variables 2014-06-18 02:39:30 +02:00
Albert Vaca
f12a3768b4 Translated sendfileitemaction and the CLI 2014-06-17 22:21:58 +02:00
Aleix Pol
a1a560c469 First approach to a KF5 port of KDE Connect
Ported using KDELibs4Support, for a smaller delta, so we can keep
developing on master until we decide not to.

At the moment, it builds and installs but tests don't pass because
of a QCA2 initialization problem I didn't manage to debug yet.

CCMAIL: kdeconnect@kde.org
2014-06-16 20:02:07 +02:00
Rohan Garg
83c882cbdd Fix build 2014-06-14 16:50:54 +02: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
Aleix Pol
d5928197b2 CLI application to interact with kdeconnect kded module
Lists devices and makes it possible to share a url or a file with any
device.

REVIEW: 113343
2014-04-01 03:12:31 +02:00