(self)
return inp, inptype
Checks if there is any keyboard or mouse input, then returns
		input (keyname or clickposition) and inptype ('mouseclick' or
		'keypress') or None, None when no input is registered
		
		arguments
		None
		
		keyword arguments
		None
		
		returns
		inp, inptype	--	inp is a keyname (string) when a key has
							been pressed, or a click position
							((x,y) tuple) when a mouse button has
							been pressed
						inptype is a string, either 'mouseclick',
							or 'keypress'
						if no input is registered, returnvalues
						will be None, None
Checks if there is any keyboard or mouse input, then returns
		input (keyname or clickposition) and inptype ('mouseclick' or
		'keypress') or None, None when no input is registered
		
		arguments
		None
		
		keyword arguments
		None
		
		returns
		inp, inptype	--	inp is a keyname (string) when a key has
							been pressed, or a click position
							((x,y) tuple) when a mouse button has
							been pressed
						inptype is a string, either 'mouseclick',
							or 'keypress'
						if no input is registered, returnvalues
						will be None, None
Checks if there is any keyboard or mouse input then returns input ( keyname or clickposition ) and inptype ( mouseclick or keypress ) or None None when no input is registered arguments None keyword arguments None returns inp inptype -- inp is a keyname ( string ) when a key has been pressed or a click position (( x y ) tuple ) when a mouse button has been pressed inptype is a string either mouseclick or keypress if no input is registered returnvalues will be None None
def check_input(self):
		
		"""Checks if there is any keyboard or mouse input, then returns
		input (keyname or clickposition) and inptype ('mouseclick' or
		'keypress') or None, None when no input is registered
		
		arguments
		None
		
		keyword arguments
		None
		
		returns
		inp, inptype	--	inp is a keyname (string) when a key has
							been pressed, or a click position
							((x,y) tuple) when a mouse button has
							been pressed
						inptype is a string, either 'mouseclick',
							or 'keypress'
						if no input is registered, returnvalues
						will be None, None
		"""
		
		# if nothing happens, None should be returned
		inp = None
		inptype = None
		
		# check events in queue
		for event in pygame.event.get():
			# mouseclicks
			if event.type == pygame.MOUSEBUTTONDOWN:
				inp = pygame.mouse.get_pos()
				inptype = 'mouseclick'
			# keypresses
			elif event.type == pygame.KEYDOWN:
				inp = pygame.key.name(event.key)
				inptype = 'keypress'

		return inp, inptype
def check_input ( self ) : # if nothing happens, None should be returned inp = None inptype = None # check events in queue for event in pygame . event . get ( ) : # mouseclicks if event . type == pygame . MOUSEBUTTONDOWN : inp = pygame . mouse . get_pos ( ) inptype = 'mouseclick' # keypresses elif event . type == pygame . KEYDOWN : inp = pygame . key . name ( event . key ) inptype = 'keypress' return inp , inptype