pygame   documentation
||  Home  ||  Help Contents  ||
 
|| pygame || cdrom || constants || cursor || display || draw ||
|| event || font || image || joystick || key || mixer ||
|| mixer_music || mouse || movie || sndarray || surfarray || time ||
|| transform ||
 
|| CD || Channel || Clock || Font || Joystick || Movie ||
|| Overlay || Rect || Sound || Surface ||
 
|| color || cursors || sprite ||

pygame.key

Contains routines for dealing with the keyboard. All keyboard events can be retreived through the pygame.event module. With the key module, you can get the current state of the keyboard, as well as set the rate of keyboard repeating and lookup names of keysyms.
get_focused - state of keyboard focus
get_mods - get current state of modifier keys
get_pressed - get the pressed state for all keys
name - get the name of a key
set_mods - set the state of the modifier keys
set_repeat - change the keyboard repeat

get_focused
pygame.key.get_focused() -> bool
 
get_mods
pygame.key.get_mods() -> int
 
get_pressed
pygame.key.get_pressed() -> tuple of bools
 
name
pygame.key.name(int) -> string
 
set_mods
pygame.key.set_mods(int) -> None
 
set_repeat
pygame.key.set_repeat([delay, interval]) -> None