How to get input on Native C++ Service

I'm developing Native Service with C++.
I develop wayland client (wl_surface with wl_shm) and I can see the screen.
I want to get input event and I develop wayland client wl_pointer and wl_keyboard.
I add wl_pointer and wl_keyboard listener on client side but I can receive any input event.
At the log, the Surface is focused but there is no any input log.
Would you tell me how can I get input event on wayland client side?

It's same with general wayland client.
We need to update the example with the input usage.

It may take times.

Thank you for the reply.
Before you update the guide page and I refer to it, I wonder if I missed anything.

I bind registry and add listener for wl_seat like this.

wl_registry_bind(registry, id, &wl_seat_interface, version);

    static const struct wl_seat_listener seat_listener = {

    wl_seat_add_listener(mSeat, &seat_listener, mDisplay);

It works well and seatCapabilities function is called.
In seatCapabilities function, I get pointer and add listener for pointer.
wl_pointer_add_listener returns 0 but I can't get pointer event when I use mouse.

Is there anything additional I need to do to get mouse input?


Yes, it should work.

  1. get_pointer for all the seats.
  2. export WAYLAND_DEBUG=1 , then you can find debug file in /tmp.
    file name is waland_%processname_%pid