Review Request 129728: kdeconnect-android: Add remotekeyboard plugin

Holger Kaelberer holger.k at elberer.de
Wed Jan 11 20:01:47 UTC 2017



> On Jan. 10, 2017, 10:17 p.m., Albert Vaca Cintora wrote:
> > src/org/kde/kdeconnect/Plugins/RemoteKeyboardPlugin/RemoteKeyboardPlugin.java, line 206
> > <https://git.reviewboard.kde.org/r/129728/diff/1/?file=488309#file488309line206>
> >
> >     Doesn't Android implement this for us? If we just inject the Control + Arrow keys at once, I think it should already behave like this, without having to implement it ourselves.
> >     
> >     There is an (open source) keyboard called "Hacker's Keyboard" on the Play Store that has all the special keys like Ctrl, Shift, arrows, etc. And doing Ctrl + Shift + arrow with that keyboad works as expected, so I'm guessing that Android already implements this.

Good hint. Will keep it like it is as it works now, and have a look at these special keys later.


> On Jan. 10, 2017, 10:17 p.m., Albert Vaca Cintora wrote:
> > src/org/kde/kdeconnect/Plugins/RemoteKeyboardPlugin/RemoteKeyboardService.java, line 80
> > <https://git.reviewboard.kde.org/r/129728/diff/1/?file=488310#file488310line80>
> >
> >     Isn't 'connected' equivalent to !instances.empty()? If it is, it might be better to not store 'connected' and just check '!instances.empty()' because with 'connected' there could be race conditions if two threads try to set it to true and false at the same time and they do it out of order.

Correct. connected is just for tracking state and check whether updates of the keyboard icons are necessary. Will drop it.


> On Jan. 10, 2017, 10:17 p.m., Albert Vaca Cintora wrote:
> > src/org/kde/kdeconnect/Plugins/RemoteKeyboardPlugin/RemoteKeyboardService.java, line 168
> > <https://git.reviewboard.kde.org/r/129728/diff/1/?file=488310#file488310line168>
> >
> >     There is only one option in settins, so maybe this button could take you to the main app instead of the settings?

Possibly. Idea was to add a short-cut to access the settings. I expect more settings to be added, like "Allow full screen editor" that seems useful.

If it should take the user to the main app, the icon should better be replaced by ... maybe the kdeconnect-icon?


- Holger


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


On Dec. 30, 2016, 4:57 p.m., Holger Kaelberer wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/129728/
> -----------------------------------------------------------
> 
> (Updated Dec. 30, 2016, 4:57 p.m.)
> 
> 
> Review request for kdeconnect.
> 
> 
> Bugs: 370919
>     http://bugs.kde.org/show_bug.cgi?id=370919
> 
> 
> Repository: kdeconnect-android
> 
> 
> Description
> -------
> 
> Allow to receive keypress events from remote devices.
> 
> Notes / open issues / possible improvements:
> 
> - Pls. have a close look at the Android-code, that was written by a non-Android dev! ;-) Especially:
> 
> - Not sure if invocations of InputConnection::sendKeyEvents() from the thread triggering onPackageReceived() need to by async (using a Handler or so). Works fine for me as it is now, but maybe I'm not aware of some Android threading policies.
> 
> - So far no settings-activity for the ime defined to be launched from the OS settings. Should we?
> 
> - Handles a couple of special key-sequences so far: Shift+Arrows/Home/End (update selection), Ctrl+(Shift+)Arrows (jump/update selection by word), Ctrl+Enter (force Send/Go/... IME-Action), Ctrl+c/v/x/a (Copy/Paste/Cut/Select all)
> 
> - There is probably other behaviour that could be made configurable (like Ctrl+Return triggering IME-actions etc.)
> 
> 
> Diffs
> -----
> 
>   AndroidManifest.xml b1e1c51 
>   res/drawable-hdpi/ic_keyboard_hide_white_36dp.png PRE-CREATION 
>   res/drawable-hdpi/ic_phonelink_off_white_36dp.png PRE-CREATION 
>   res/drawable-hdpi/ic_phonelink_white_36dp.png PRE-CREATION 
>   res/drawable-mdpi/ic_keyboard_hide_white_36dp.png PRE-CREATION 
>   res/drawable-mdpi/ic_phonelink_off_white_36dp.png PRE-CREATION 
>   res/drawable-mdpi/ic_phonelink_white_36dp.png PRE-CREATION 
>   res/drawable-xhdpi/ic_keyboard_hide_white_36dp.png PRE-CREATION 
>   res/drawable-xhdpi/ic_phonelink_off_white_36dp.png PRE-CREATION 
>   res/drawable-xhdpi/ic_phonelink_white_36dp.png PRE-CREATION 
>   res/drawable-xxhdpi/ic_keyboard_hide_white_36dp.png PRE-CREATION 
>   res/drawable-xxhdpi/ic_phonelink_off_white_36dp.png PRE-CREATION 
>   res/drawable-xxhdpi/ic_phonelink_white_36dp.png PRE-CREATION 
>   res/drawable-xxxhdpi/ic_keyboard_hide_white_36dp.png PRE-CREATION 
>   res/drawable-xxxhdpi/ic_phonelink_off_white_36dp.png PRE-CREATION 
>   res/drawable-xxxhdpi/ic_phonelink_white_36dp.png PRE-CREATION 
>   res/values/dimens.xml 47c8224 
>   res/values/strings.xml 955b88d 
>   res/xml/remotekeyboardplugin_keyboard.xml PRE-CREATION 
>   res/xml/remotekeyboardplugin_method.xml PRE-CREATION 
>   res/xml/remotekeyboardplugin_preferences.xml PRE-CREATION 
>   src/org/kde/kdeconnect/Plugins/PluginFactory.java 1da88ef 
>   src/org/kde/kdeconnect/Plugins/RemoteKeyboardPlugin/RemoteKeyboardPlugin.java PRE-CREATION 
>   src/org/kde/kdeconnect/Plugins/RemoteKeyboardPlugin/RemoteKeyboardService.java PRE-CREATION 
>   src/org/kde/kdeconnect/UserInterface/MaterialActivity.java c28e38c 
> 
> Diff: https://git.reviewboard.kde.org/r/129728/diff/
> 
> 
> Testing
> -------
> 
> Sure, on:
> - S2 (4.2.2, CyanogenMod)
> - Sony Z5 Compact (6.0.1)
> - Galaxy Tab 4 (5.0.2)
> - S3 Mini (4.1.2)
> 
> 
> Thanks,
> 
> Holger Kaelberer
> 
>

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


More information about the KDEConnect mailing list