Review Request 119254: Add support for receiving keyboard entries

Saikrishna Arcot saiarcot895 at gmail.com
Sun Aug 3 20:42:00 UTC 2014



> On Aug. 1, 2014, 11:30 a.m., Albert Vaca Cintora wrote:
> > Looks good, but it would be really cool if we don't need to implement support for each special key (dot, comma....). What I would do is that when you press a key on android that has a text representation, just send that text to kde and enter it directly (not simulating keycodes, but just inserting the text) and only use keycodes for the keys that don't have text representation (Esc, Shift...). This way we will support every key without having to add special support for them, and even keyboards for "exotic" languages. 
> > 
> > Also I found a couple of small (and easy to fix) bugs that would be nice to fix before merging it: On Android, the back key doesn't work anymore in the input window (because you are capturing it as a key) and also the keyboard is not shown if you are in landscape mode.
> > 
> > Thanks!

I'm not sure how the first part can be done. X server wants things to be in its keycode format (integer), which doesn't match up with Unicode. Furthermore, for the special keys, the `XStringToKeycode` function needs them to be the name of th special key rather than the symbol (as that's how they are defined in `/usr/include/X11/keysymdef.h`). Also, I don't know of any way of directly inserting the text into where th cursor/focus is.

That being said, I have a bit of a crazy idea: the key string that's received by KDE could be copied into the clipboard, and a `Ctrl+V` could be simulated to represent pasting it. I have no idea to what extent this might work or what other possible regressions there might be (besides the user no longer being able to remotely use the keyboard).

I'll work on those bugs.


- Saikrishna


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


On Aug. 1, 2014, 3:32 a.m., Saikrishna Arcot wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/119254/
> -----------------------------------------------------------
> 
> (Updated Aug. 1, 2014, 3:32 a.m.)
> 
> 
> Review request for kdeconnect.
> 
> 
> Repository: kdeconnect-kde
> 
> 
> Description
> -------
> 
> Add support for receiving keyboard entries.
> 
> This patch gets the keyboard entries from the Android client and passes along the keycode.
> 
> The Android version is [here](https://git.reviewboard.kde.org/r/119255/).
> 
> 
> Diffs
> -----
> 
>   plugins/mousepad/mousepadplugin.h 64f5d880057820127788d7653796946bffcedafe 
>   plugins/mousepad/mousepadplugin.cpp 64aae5cc938e2630bde3f329ec01bcd9b8651ce5 
> 
> Diff: https://git.reviewboard.kde.org/r/119254/diff/
> 
> 
> Testing
> -------
> 
> Checked and tested. Only lowercase letters, numbers, and the period and comma work. 
> 
> 
> Thanks,
> 
> Saikrishna Arcot
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdeconnect/attachments/20140803/436c044e/attachment.html>


More information about the KDEConnect mailing list