pygame.locals — pygame v2.6.1 documentation

##### pygame documentation

Pygame Home || Help Contents || Reference Index

Most useful stuff: Color | display | draw | event | font | image | key | locals | mixer | mouse | Rect | Surface | time | music | pygame

Advanced stuff: cursors | joystick | mask | sprite | transform | BufferProxy | freetype | gfxdraw | midi | PixelArray | pixelcopy | sndarray | surfarray | math

Other: camera | controller | examples | fastevent | scrap | tests | touch | version

`pygame.locals`
  pygame constants

  This module contains various constants used by pygame. Its contents are automatically placed in the pygame module namespace. However, an application can use `pygame.locals` to include only the pygame constants with a `from pygame.locals import *`.

  Detailed descriptions of the various constants can be found throughout the pygame documentation. Here are the locations of some of them.

  > - The `pygame.display`pygame module to control the display window and screen module contains flags like `FULLSCREEN` used by `pygame.display.set_mode()`Initialize a window or screen for display.

  > - The `pygame.event`pygame module for interacting with events and queues module contains the various event types.

  > - The `pygame.key`pygame module to work with the keyboard module lists the keyboard constants and modifiers (`K_`* and `MOD_`*) relating to the `key` and `mod` attributes of the `KEYDOWN` and `KEYUP` events.

  > - The `pygame.time`pygame module for monitoring time module defines `TIMER_RESOLUTION`.

Edit on GitHub