Added functions for checkspecialkeys, userinputinterface and large changes to previous functions