Hi, I want to get keyboard and mouse events for code inside of the X server. Is there an api to do that?