Review Request 129727: kdeconnect-kde: Add remotekeyboard plugin

Albert Vaca Cintora albertvaka at gmail.com
Sat Jan 21 02:57:38 UTC 2017


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/129727/#review102152
-----------------------------------------------------------


Ship it!




Looks good to me. Ship it! This was one of these missing features that was waiting to be implemented since forever :) Good job!

- Albert Vaca Cintora


On gen. 13, 2017, 12:33 p.m., Holger Kaelberer wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/129727/
> -----------------------------------------------------------
> 
> (Updated gen. 13, 2017, 12:33 p.m.)
> 
> 
> Review request for kdeconnect.
> 
> 
> Bugs: 370919
>     http://bugs.kde.org/show_bug.cgi?id=370919
> 
> 
> Repository: kdeconnect-kde
> 
> 
> Description
> -------
> 
> 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?
> 
> 
> Diffs
> -----
> 
>   cli/kdeconnect-cli.cpp 1acb723 
>   interfaces/CMakeLists.txt 19a9cdc 
>   interfaces/dbusinterfaces.h 9848d0c 
>   interfaces/dbusinterfaces.cpp aab3e05 
>   plasmoid/declarativeplugin/kdeconnectdeclarativeplugin.cpp 282f2a9 
>   plasmoid/package/contents/ui/DeviceDelegate.qml e90e021 
>   plasmoid/package/contents/ui/RemoteKeyboard.qml PRE-CREATION 
>   plugins/CMakeLists.txt 9d230ac 
>   plugins/remotekeyboard/CMakeLists.txt PRE-CREATION 
>   plugins/remotekeyboard/README PRE-CREATION 
>   plugins/remotekeyboard/kdeconnect_remotekeyboard.json PRE-CREATION 
>   plugins/remotekeyboard/remotekeyboardplugin.h PRE-CREATION 
>   plugins/remotekeyboard/remotekeyboardplugin.cpp PRE-CREATION 
> 
> Diff: https://git.reviewboard.kde.org/r/129727/diff/
> 
> 
> Testing
> -------
> 
> A lot!
> 
> 
> Thanks,
> 
> Holger Kaelberer
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdeconnect/attachments/20170121/5bf4dcc9/attachment.html>


More information about the KDEConnect mailing list