040ad7357b
Allow to inject keypress events to remote peers (most notably Android devices) Notes / open issues / possible improvements: - For the json-payload I used the syntax of the key-events as sent by mousepad-plugin with the addition of a "sendAck"-flag. If "sendAck" is set to true the remote peer should echo a key-event if it could be handled, thus allowing the local client to find out whether the key was accepted. For performance reasons, it's allowed to send multi-char strings in the "key" property (performs much better if you send a whole string via "echo '...' | kdeconnect-cli ..." e.g.) - kdeconnect-cli: For now takes a string and transforms it into single key-events for visible characters only. In a first implementation I used a kbhit() helper that used termios.h to catch and relay keypresses interactively (including some special-events), which was not optimal. A better approch might be to use linux input-api directly. Would this be an option regarding cross-platform compatibility or can I assume to develop for Linux only? Being a command-line guy, I'd really like to have a fully featured kdeconnect-cli interface ;-) - Factor out the Qt::Key-to-internal keymap to some core-helper because it corresponds to the mapping in the mousepad-plugin? - The plasmoid is not perfect as it is: A single line containing a non-echoing TextField (i.e. it eats all the KeyPress events), and only ack-ed keypress-packets from the peer device are injected if they contain visible keys. Advantage: the user sees whether his key-presses are accepted by the peer device. Disadvantage: The echoed text does not correspond 1:1 to what is shown on the peer's display, user might be confused when typing without success. I played around with different variations each of which with its proper shortcomings: 1. An echoing Textfield for typing: Has the advantage that the user can directly see what he is typing, which makes interaction in the typing field easier, BUT messes up interaction if the Editor on the peer is changed silently and does not notify the user if his keypresses are not handled by the peer. 2. A non-echoing TextField for typing PLUS a readonly one for printing visible echoed keys. Disadvantage: same as for the previous one and uses more space on the plasmoid. Comments? Ideas? REVIEW: 129727 BUG: 370919
81 lines
No EOL
4.3 KiB
JSON
81 lines
No EOL
4.3 KiB
JSON
{
|
||
"Encoding": "UTF-8",
|
||
"KPlugin": {
|
||
"Authors": [
|
||
{
|
||
"Email": "ahmedibrahimkhali@gmail.com",
|
||
"Name": "Ahmed I. Khalil",
|
||
"Name[ar]": "أحمد إبراهيم خليل",
|
||
"Name[x-test]": "xxAhmed I. Khalilxx"
|
||
}
|
||
],
|
||
"Description": "Use your phone as a touchpad and keyboard",
|
||
"Description[ar]": "استخدم الهاتف كفأرة ولوحة مفاتيح",
|
||
"Description[ca@valencia]": "Empra el telèfon com un ratolí tàctil i teclat",
|
||
"Description[ca]": "Empra el telèfon com un ratolí tàctil i teclat",
|
||
"Description[cs]": "Používejte svůj telefon jako touchpad a klávesnici",
|
||
"Description[da]": "Brug din telefon som touchpad og tastatur",
|
||
"Description[de]": "Verwendet Ihr Handy als Touchpad und Tastatur",
|
||
"Description[el]": "Χρήση του τηλεφώνου σας ως οθόνη αφής και πληκτρολογίου",
|
||
"Description[es]": "Usar teléfono como panel táctil y teclado",
|
||
"Description[et]": "Telefoni kasutamine puutepadja ja klaviatuurina",
|
||
"Description[fi]": "Käytä puhelintasi kosketuslevynä ja näppäimistönä",
|
||
"Description[gl]": "Usar o teléfono móbil como touchpad e teclado.",
|
||
"Description[hu]": "A telefon használata érintőtáblaként és billentyűzetként",
|
||
"Description[it]": "Usa il telefono come touchpad e tastiera",
|
||
"Description[ko]": "휴대폰을 터치패드와 키보드로 사용",
|
||
"Description[nl]": "Uw telefoon gebruiken als een touchpad en toetsenbord",
|
||
"Description[nn]": "Bruk telefonen som styreplate og tastatur",
|
||
"Description[pl]": "Używaj swojego telefonu jako gładzika i klawiatury",
|
||
"Description[pt]": "Use o seu telefone como um rato e teclado por toque",
|
||
"Description[pt_BR]": "Use seu telefone como um touchpad e teclado",
|
||
"Description[ru]": "Использование телефона в качестве сенсорной панели и клавиатуры",
|
||
"Description[sk]": "Použite váš telefón ako touchpad a klávesnicu",
|
||
"Description[sv]": "Använd telefonen som mus och tangentbord",
|
||
"Description[tr]": "Telefonunuzu dokunmatik yüzey ve klayve olarak kullanın",
|
||
"Description[uk]": "Скористайтеся телефоном як замінником сенсорної панелі і клавіатури",
|
||
"Description[x-test]": "xxUse your phone as a touchpad and keyboardxx",
|
||
"Description[zh_CN]": "用您的手机作为触摸板和键盘",
|
||
"Description[zh_TW]": "讓您的智慧型手機當作觸碰板與鍵盤",
|
||
"EnabledByDefault": true,
|
||
"Icon": "edit-select",
|
||
"Id": "kdeconnect_mousepad",
|
||
"License": "GPL",
|
||
"Name": "Virtual input",
|
||
"Name[ar]": "دخل وهميّ",
|
||
"Name[ca@valencia]": "Entrada virtual",
|
||
"Name[ca]": "Entrada virtual",
|
||
"Name[cs]": "Virtuální vstup",
|
||
"Name[da]": "Virtuelt input",
|
||
"Name[de]": "Virtuelle Eingabe",
|
||
"Name[el]": "Εικονικά στοιχεία εισόδου",
|
||
"Name[es]": "Entrada virtual",
|
||
"Name[et]": "Virtuaalsisestus",
|
||
"Name[fi]": "Virtuaalinen syöttö",
|
||
"Name[gl]": "Entrada virtual",
|
||
"Name[hu]": "Virtuális bevitel",
|
||
"Name[it]": "Inserimento virtuale",
|
||
"Name[ko]": "가상 입력",
|
||
"Name[nl]": "Virtuele invoer",
|
||
"Name[nn]": "Virtuelt tastatur",
|
||
"Name[pl]": "Wirtualna obsługa",
|
||
"Name[pt]": "Entrada virtual",
|
||
"Name[pt_BR]": "Entrada virtual",
|
||
"Name[ru]": "Виртуальный ввод",
|
||
"Name[sk]": "Virtuálny vstup",
|
||
"Name[sv]": "Virtuell inmatning",
|
||
"Name[tr]": "Sanal içe aktarma",
|
||
"Name[uk]": "Віртуальне введення даних",
|
||
"Name[x-test]": "xxVirtual inputxx",
|
||
"Name[zh_CN]": "虚拟输入",
|
||
"Name[zh_TW]": "虛擬輸入",
|
||
"ServiceTypes": [
|
||
"KdeConnect/Plugin"
|
||
],
|
||
"Version": "0.1"
|
||
},
|
||
"X-KdeConnect-OutgoingPackageType": [],
|
||
"X-KdeConnect-SupportedPackageType": [
|
||
"kdeconnect.mousepad.request"
|
||
]
|
||
} |