RE: How Wayland manages the automation/access of input devices and deal with block on them

2022-12-05 Thread Victor Borghi Gimenez (FIPT)
What does still Wayland not standarize? Do you say the automation of input 
devices, don't you?


My aim consists in test UI resources as OS icons for example: Show 
applications, click on any application contained in show applications list, 
type text at the search box, and so on... Generally saying, simulate/automate 
mouse and keyboard events how a user would do (for example xdotool developed 
for X11/Xorg performs this task when you pass mousemove, getmouselocation, 
keydown/keyup as arguments).


uinput I have heard about, moreover there is a python implementation for it 
called python-uinput https://pypi.org/project/python-uinput/ which I said here 
based on uinput kernel module, I was able to automate some keyboard keystrokes 
but I was not able to automate keyboard shortcuts and mouse events.


libei I never heard about it, about compositors I don't have knowledge on how 
they work yet, I need to know what they are and their working to comprehend how 
to deal with them.


Thank you,

Victor

De: Victor Borghi Gimenez (FIPT)
Enviado: sexta-feira, 25 de novembro de 2022 04:04
Para: wayland-devel@lists.freedesktop.org 
Assunto: How Wayland manages the automation/access of input devices and deal 
with block on them

Hello there,



I was developing some scripts to automate test cases using Xlib package in 
Python to test resources (click in icons, verify the opened window, text that 
appeared) on a new linux distro here, before it was standardized in X11 and now 
they decided to standardize it in Wayland and it let me stucked to keep the 
development of the scripts because the lack of working. I also give a dig to 
find packages in Python and mouse/keyboard simulation tools compatible with 
Wayland which work in terminal and I found python-uinput which works for 
simulation of keyboard but not to simulate mouse, and ydotool which gave me 
error. Now I would like to know how Wayland manages the automation of mouse and 
keyboard opposed to X11/XOrg in order to develop any script in Python or other 
language to automate input devices, I don't have any knowledge of the 
differences from XOrg and Wayland and I fell in this study because the need to 
automate Wayland.


Thanks in advance,

Victor


Re: How Wayland manages the automation/access of input devices and deal with block on them

2022-12-05 Thread Pekka Paalanen
On Mon, 5 Dec 2022 14:11:46 +
"Victor Borghi Gimenez (FIPT)"  wrote:

> What does still Wayland not standarize? Do you say the automation of
> input devices, don't you?

Correct. There is no standard Wayland interface you could use to
programmatically feed input events into a Wayland compositor to be
delivered to clients as if they were real physical input events.

> 
> My aim consists in test UI resources as OS icons for example: Show
> applications, click on any application contained in show applications
> list, type text at the search box, and so on... Generally saying,
> simulate/automate mouse and keyboard events how a user would do (for
> example xdotool developed for X11/Xorg performs this task when you
> pass mousemove, getmouselocation, keydown/keyup as arguments).
> 

Exactly.

> uinput I have heard about, moreover there is a python implementation
> for it called python-uinput https://pypi.org/project/python-uinput/
> which I said here based on uinput kernel module, I was able to
> automate some keyboard keystrokes but I was not able to automate
> keyboard shortcuts and mouse events.

There seems to be ydotool, too, using uinput.

Uinput (the kernel interface) definitely can do everything that
physical input devices can, but using it requires knowing the evdev
protocol well.


Thanks,
pq


pgprRo6yJZoBi.pgp
Description: OpenPGP digital signature


RE: How Wayland manages the automation/access of input devices and deal with block on them

2022-12-05 Thread Victor Borghi Gimenez (FIPT)
Hi Pekka, thanks for the return!


I don't know if there is anyway to build/compile Wayland from source code to 
understand better his working, in fact I don't know nothing about OS protocols 
(Xlib, Wayland...) I finished fell into this study because this need to create 
automated tests on a Debian based distro that they developed here with Wayland 
as standard and I only explored Xlib module which didn't work.

ydotool I have already tested it through mousemove and key arguments but it 
always returned me the message "ydotoold: listening on socket 
/tmp/.ydotool_socket" and nothing happens. I am gonna give another exploring on 
uinput again.

I found that there is package called pywayland that has itself client, server 
API's https://pypi.org/project/pywayland/ but there aren't tutorials about how 
to use it.

I am gonna try to study from scratch Wayland to understand how to deal with it!


Thank you,

Victor
[https://pypi.org/static/images/twitter.6fecba6f.jpg]
pywayland ยท PyPI
Built against Wayland 1.21.0. PyWayland provides a wrapper to the libwayland 
library using the CFFI library to provide access to the Wayland library calls 
and written in pure Python.. Below is outlined some of the basics of PyWayland 
and how to get up and running.
pypi.org






De: Pekka Paalanen
Enviadas: Segunda-feira, 05 de Dezembro de 2022 12:58
Para: Victor Borghi Gimenez (FIPT)
Cc: wayland-devel@lists.freedesktop.org
Assunto: Re: How Wayland manages the automation/access of input devices and 
deal with block on them

On Mon, 5 Dec 2022 14:11:46 +
"Victor Borghi Gimenez (FIPT)"  wrote:

> What does still Wayland not standarize? Do you say the automation of
> input devices, don't you?

Correct. There is no standard Wayland interface you could use to
programmatically feed input events into a Wayland compositor to be
delivered to clients as if they were real physical input events.

>
> My aim consists in test UI resources as OS icons for example: Show
> applications, click on any application contained in show applications
> list, type text at the search box, and so on... Generally saying,
> simulate/automate mouse and keyboard events how a user would do (for
> example xdotool developed for X11/Xorg performs this task when you
> pass mousemove, getmouselocation, keydown/keyup as arguments).
>

Exactly.

> uinput I have heard about, moreover there is a python implementation
> for it called python-uinput https://pypi.org/project/python-uinput/
> which I said here based on uinput kernel module, I was able to
> automate some keyboard keystrokes but I was not able to automate
> keyboard shortcuts and mouse events.

There seems to be ydotool, too, using uinput.

Uinput (the kernel interface) definitely can do everything that
physical input devices can, but using it requires knowing the evdev
protocol well.


Thanks,
pq