keypressmgr.py
def isPressed(keys, key, states=KEY_ANY_STATE, modifiers=()): # {{{0
  "Return True if an event exists for the given key"
  code, mods = parseKey(key)
  pressed = ((keys.get(code, 0) & states) != 0)
  # Ensure all modifiers are present, regardless of value
  for m in set(modifiers).union(set(mods)):
    if m not in keys:
      return False
  return pressed
Return True if an event exists for the given key
Return True if an event exists for the given key
Return True if an event exists for the given key
def isPressed(keys, key, states=KEY_ANY_STATE, modifiers=()): 
  code, mods = parseKey(key)
  pressed = ((keys.get(code, 0) & states) != 0)
  for m in set(modifiers).union(set(mods)):
    if m not in keys:
      return False
  return pressed
def isPressed ( keys , key , states = KEY_ANY_STATE , modifiers = ( ) ) : code , mods = parseKey ( key ) pressed = ( ( keys . get ( code , 0 ) & states ) != 0 ) for m in set ( modifiers ) . union ( set ( mods ) ) : if m not in keys : return False return pressed
Return True if an event exists for the given key
Return True if an event exists for the given key
# {{{0 "Return True if an event exists for the given key" # Ensure all modifiers are present, regardless of value
keys
key
states
modifiers