The xev(1) utility creates a window and then asks the X
server to send it events whenever anything happens to the
window (such when it is moved, resized, typed in, or clicked in).
You can also attach it to an existing window. It is useful for
seeing what causes events to occur and displaying the information
that such events contain.