X Events
| Event Name | Code |
| KeyPress | 2 |
| KeyRelease | 3 |
| ButtonPress | 4 |
| ButtonRelease | 5 |
| MotionNotify | 6 |
| EnterNotify | 7 |
| LeaveNotify | 8 |
| FocusIn | 9 |
| FocusOut | 10 |
| KeymapNotify | 11 |
| Expose | 12 |
| GraphicsExpose | 13 |
| NoExpose | 14 |
| VisibilityNotify | 15 |
| CreateNotify | 16 |
| DestroyNotify | 17 |
| UnmapNotify | 18 |
| MapNotify | 19 |
| MapRequest | 20 |
| ReparentNotify | 21 |
| ConfigureNotify | 22 |
| ConfigureRequest | 23 |
| GravityNotify | 24 |
| ResizeRequest | 25 |
| CirculateNotify | 26 |
| CirculateRequest | 27 |
| PropertyNotify | 28 |
| SelectionClear | 29 |
| SelectionRequest | 30 |
| SelectionNotify | 31 |
| ColormapNotify | 32 |
| ClientMessage | 33 |
| MappingNotify | 34 |
|
X Errors
| Error Name | Code | Reason |
| Success | 0 | everything's okay |
| BadRequest | 1 | bad request code |
| BadValue | 2 | int parameter out of range |
| BadWindow | 3 | parameter not a Window |
| BadPixmap | 4 | parameter not a Pixmap |
| BadAtom | 5 | parameter not an Atom |
| BadCursor | 6 | parameter not a Cursor |
| BadFont | 7 | parameter not a Font |
| BadMatch | 8 | parameter mismatch |
| BadDrawable | 9 | parameter not a Pixmap or Window |
| BadAccess | 10 | depending on context:
- key/button already grabbed
- attempt to free an illegal cmap entry
- attempt to store into a read-only color map entry
- attempt to modify the access control list from other than the local host
|
| BadAlloc | 11 | insufficient resources |
| BadColor | 12 | no such colormap |
| BadGC | 13 | parameter not a GC |
| BadIDChoice | 14 | choice not in range or already used |
| BadName | 15 | font or color name doesn't exist |
| BadLength | 16 | request length incorrect |
| BadImplementation | 17 | server is defective |
|