Shkyera Engine
Easy to use, game engine for Python
shkyera.lib.input Namespace Reference

Functions

def add_key (str key)
 
def is_pressed (str key)
 
def clear ()
 

Variables

 input_keys = set()
 

Function Documentation

◆ add_key()

def shkyera.lib.input.add_key ( str  key)
Add a key to the set of pressed keys.

Parameters:
key (str): The key to be added to the set.

Returns:
None

◆ clear()

def shkyera.lib.input.clear ( )
Clear the set of pressed keys.

This function resets the set of pressed keys to an empty set, effectively clearing all previously pressed keys.

Returns:
None

◆ is_pressed()

def shkyera.lib.input.is_pressed ( str  key)
Check if a specific key is currently pressed.

Parameters:
key (str): The key code to be checked for being pressed. Check documentation for the list of available key codes.

Returns:
bool: True if the key is pressed, False otherwise.

Variable Documentation

◆ input_keys

shkyera.lib.input.input_keys = set()