Cant grab keyboard in wayland

Hi,I am writing a remote desktop tool so I need to grab keyboard. On xorg, I can grab keyboard but Alt+Tab still work and mouse are also grabbedl. On wayland, all grab function cant work. What I need is to full grab keyboard and optional mouse.
I guess the problem is the lack of Compositor shortcuts inhibit protocol. XWayland keyboard grabbing protocol.whit these protocol, the system will ask is it allowed to grab input when program start.
Or is there a way to do it in sdl that I dont know?