<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Sat, Jul 5, 2014 at 1:32 PM, Ahmed Ibrahim Khalil <span dir="ltr"><<a href="mailto:ahmedibrahimkhali@gmail.com" target="_blank">ahmedibrahimkhali@gmail.com</a>></span> wrote:<br>


<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hello, <div><br></div><div>I'm planning to add Keyboard emulation to KDEConnect.</div>

<div><br></div>
<div>What I am thinking of is that, While the user is opening the Mousepad activity. And he begins to focus on a text field, in KDE (either via mousepad or via hardware mouse), The soft keyboard is shown on his phone automatically to begin typing, and all his key presses is written on the focused text field.</div>



<div><br></div><div>If the user focuses out of the text field, the soft keyboard is hidden automatically from the phone.</div><div><br></div><div>I tried to write a proof of concept to listen for the focus events in the whole KDE desktop, using the </div>



<div>X Input Method, and setting the input focus on the XDefaultRootWindow to listen for FocusIn and FocusOut events, but nothing is fired.</div><div><br></div><div>I'll post the code that I've tried [1], maybe someone could help me figuring out, how to listen for the focus events on all KDE desktop.</div>



<div><br></div><div><br></div><div>Cheers</div><div><br></div><div>[1] <a href="http://pastebin.com/6uq96KUr" target="_blank">http://pastebin.com/6uq96KUr</a></div></div></blockquote><div><br></div><div>Hi Ahmed,<br></div>


<div>I agree that this would be really nice, to get the keyboard when the focus is received.<br><br></div><div>I'm pretty sure you can find your answer in the maiit code [1], or at least use it as a way to retrieve this kind of data. Maliit is hte project they created for the N9 keyboard, used by Plasma Active and Jolla. I'm unsure if it shows a different keyboard per app or what, though.<br>

<br>Aleix<br><br>[1] <a href="https://github.com/maliit">https://github.com/maliit</a><br></div></div><br></div></div>