I'm trying to make an API which keeps track of user input and allows for easily checking if a key is pressed, and I want to have tables that store what keys and mouse buttons are held down, but I can't find anything that mentions variables in APIs in any way.
I made a simple test function and I have found out that APIs can, indeed declare variables. I don't know why I didn't do that first.
are you using os.loadAPI or require? (note: you should be using require because superglobals are bad)