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 ?
Cheers,
Ilya D.
hi!
Have you tried 'dbus-monitor' ?
Nik
Am Samstag, 21. November 2015 schrieb Ilya Dogolazky:
Hello !
I would like to understand how keyboard layouts are switched by the Trinity. More precise:
- 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 ?
Cheers,
Ilya D.
To unsubscribe, e-mail: trinity-devel-unsubscribe@lists.pearsoncomputing.net For additional commands, e-mail: trinity-devel-help@lists.pearsoncomputing.net Read list messages on the web archive: http://trinity-devel.pearsoncomputing.net/ Please remember not to top-post: http://trinity.pearsoncomputing.net/mailing_lists/#top-posting
-----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:
- 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
Ilya Dogolazky wrote:
- 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?
I change the default shortcut for keyboard switch (left CTRL+ left ALT+k) to CTRL+ALT+ right arrow. When using non latin keyboard the k is useless. Not sure what you need this for but I had the feeling you are looking for an easy way to switch between keyboard layouts
regards