It was quite difficult to look up for Windows, and X11 has its own more complicated way of doing things. On X11, I’ve managed to enter fullscreen, but exiting is even more difficult and less documented.
I know Wayland exists, but as long as XWayland provides a good enough support, I’ll use that instead for now, due to lack of time on my own side.
EDIT: To clarify: I meant how do I do it via API calls, in programming, not by what key is the default (which is F11).
F11 is the default in most cases to enter and exit full screen. Same as Windows I think (I wouldn’t know for sure, never really used it).