Interested in contributing to KDEConnect

Ahmed Ibrahim Khalil ahmedibrahimkhali at gmail.com
Sat Jun 28 22:08:27 UTC 2014


Hi Albert,
I've tried to use uinput, and the example you gave, but for some reason, it
didn't work for real time input, I think it needs to buffer for sometime to
be able to execute the input_events smoothly.

Anyway I've managed to use XTest by sending scroll up and scroll down
button events.

I'll post a review request, right away. Please If you have time, test it on
your device and tell me your opinion.

Cheers


On Sat, Jun 28, 2014 at 3:23 PM, Albert Vaca <albertvaka at gmail.com> wrote:

> I was able to write to /dev/uinput without root permisions, just make sure
> you are opening it as O_WRONLY | O_NONBLOCK.
>
> I'm using this example and it works well, even though I had to change
> "/dev/input/uinput" to just "/dev/uinput":
>
>
> http://git.nosuchfile.org/?p=uinput-sample.git;a=blob_plain;f=uinput-sample.c;hb=HEAD
>
>
> On Jun 28, 2014 2:45 PM, "Ahmed Ibrahim Khalil" <
> ahmedibrahimkhali at gmail.com> wrote:
>
>> Hi Albert,
>>
>> It is a good idea to use uinput, I've seen the API and I think it is
>> pretty easy to deal with.
>>
>> But one problem I think we might face, is that the permission of the
>> "/dev/uinput" file, I've tried the libsuinput API and the file descriptor
>> return was always -1. Until I've changed the permission with chmod to
>> "+0666" it worked after that.
>>
>> How are we going to solve that problem on the KDE users devices ? Of
>> course we won't tell them to execute that command on the /dev/uniput file,
>> right ?
>>
>> Cheers
>>
>>
>> On Sat, Jun 28, 2014 at 11:09 AM, Albert Vaca <albertvaka at gmail.com>
>> wrote:
>>
>>> Hello Ahmed,
>>>
>>> Maybe you want to change and use "uinput", the linux input
>>> system, directly. With uinput you can register yourself as an input device,
>>> just like a real mouse or touchpad. This has several advantages, like that
>>> the settings in KDE that are applied to the mouse will also be applied to
>>> your input, or that you will be able to simulate smooth scroll (pixel by
>>> pixel and not line by line).
>>>
>>> I haven't tried it, but I just found an example that uses uinput and
>>> simulates a scroll wheel: http://android.serverbox.ch/?p=334
>>>
>>> Also there is a library to make it easy to use uinput from user space:
>>> http://tjjr.fi/sw/libsuinput/
>>>
>>> If you want to keep with XTest and can manage to make it work it's fine,
>>> I'm just suggesting a different approach in case XTest is not enough :)
>>>
>>> Cheers!
>>> Albert
>>>
>>> El dissabte, 28 juny de 2014, Ahmed Ibrahim Khalil <
>>> ahmedibrahimkhali at gmail.com> va escriure:
>>>
>>> Great Ideas Albert, I am currently working on two thumb scrolling, it is
>>>> pretty easy to implement on Android and I am half way though it, but still
>>>> need to figure out on how to send the scroll event using XTest
>>>>
>>>>
>>>> On Fri, Jun 27, 2014 at 4:28 PM, Albert Vaca <albertvaka at gmail.com>
>>>> wrote:
>>>>
>>>>> And about the right click problem: you could add a small button to the
>>>>> top bar or somewhere else to do it.
>>>>>
>>>>> And maybe we could have another button to open the Android keyboard
>>>>> and send the keystrokes to KDE.
>>>>>
>>>>> I think this would be super useful for media centers or other setups
>>>>> where you don't use the keyboard and mouse often, so you don't want to have
>>>>> one always attached.
>>>>>
>>>>>
>>>>> On Fri, Jun 27, 2014 at 4:28 PM, Albert Vaca <albertvaka at gmail.com>
>>>>> wrote:
>>>>>
>>>>>> It's merged! You should have received an email with the commits.
>>>>>>
>>>>>> I would love that you keep contributing to KDE Connect with this or
>>>>>> other plugins :)
>>>>>>
>>>>>> I think we have lots of possibilities, and would be great to have you
>>>>>> with us!
>>>>>>
>>>>>
>>>>>
>>>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdeconnect/attachments/20140629/9d53c88c/attachment-0001.html>


More information about the KDEConnect mailing list