trinity-devel@lists.pearsoncomputing.net

Message: previous - next
Month: November 2015

Re: [trinity-devel] keyboard layout switching

From: Michele Calgaro <michele.calgaro@...>
Date: Sat, 21 Nov 2015 23:18:22 +0800
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

On 11/21/2015 08:08 PM, Ilya Dogolazky wrote:
> Hello !
> 
> I would like to understand how keyboard layouts are switched by the Trinity. More precise:
> 
> 1) what happening when user clicks on the flag icon? Some external program called or some TDE process communicates
> with X-server (and how)? 2) what part of Trinity source code do I have to read to understand it? 3) is it possible
> to send some D-Bus message (or something similar) to emulate user's click on flag icon and/or select particular
> language from the list of available keyboard layouts? 4) the same as #3, but vice versa: can an external program
> ask TDE "what keyboard do we have right now"? 5) If answer to #3 is "NO", is there any chance for a patch doing it 
> to be included into TDE ? 6) What is the situation with questions #3 & #4 in the "mainstream window managers" (like
> KDE, Gnome) nowadays ?

Hi Ilya,
here are some answers to your points.

1 & 2) the "flag icon" is displayed by a program call "kxkb". Start from there if you want to have a look at the code.
You can find in tdebase/kxkb.

3) TDE uses DCOP, not D-Bus. You can use DCOP to change the active keyboard. Try KDCOP for easy to use DCOP client.
Looks under kxkb->kxkb->setLayout

4) same as 3) but use kxkb->kxkb->getCurrentLayout

5) patches and contributions of any kind are always welcome :-)

6) no idea, perhaps try asking on their forum ;-)

cheers
  Michele

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQIcBAEBCgAGBQJWUIs+AAoJECp1t8qK3tXP70YP/2cutYcdKckH6L+dtYt9whnl
KeKw8VKCXN6GzE6lSmAVozJ++IZAZnjC08CTzYrGM/BwP6nzBSTLzsrpY+9He6vR
qmzxwA4uLS/IfxS4VPZWq5OsS5dfBrRpVf084FI3FT4va0LVIC0OyWqv4XNyNTXV
KmM9RYkYZN06BmloMvfEUTNTQ/fJ2QuLiAKELHzw+SA5EgC64ShSF4pAmOAh2Rkx
7LsPq+aRgptsOq3zCz4I74yDxFbzUrY0m7PXnanKgP3h1FXbPJ3DoKWPfeUP6o5u
XhhpI+JkTrs80DqfcwiSID7QnwL+//tMNfToaIA53+nipoSLdNfcj8FEQ4iMVPeP
7T7j+2kYYLTsbEFT1vK2xUutHbqk1c3tRjdvcgM23SAus6esQfEFQmMCO0+xVGD0
h68VnmZR6jyiVPiixsnRQMbHoALOeMF1Ve2R3AemB6FwTYsYeCitrbMHjcMt8XOw
Sd10Uc77iG4SghTO49VaBmsUNgKIXtmSNGgqh4/1ILW9/H/ASZml6bGkzka3VeaX
8UkUUf5CLXdP9wC+Zl/VAYcWcRNXrD4pbPw9js3zxUFscDAejxF+J3n5iiGhGon8
vVuaCEYEGD+ec7dgZwNJq87fFrugJ+HPo3iXjnQyJfS7NUJ2bKkrWu8GJyy/4XEv
zZMO7u5iFoGxOTC6zPxg
=rFz5
-----END PGP SIGNATURE-----