def add_keyrepeat_callback(self, key, fn):
        """
        Allows for custom callback functions for the viewer. Called on key repeat.
        Parameter 'any' will ensure that the callback is called on any key repeat,
        and block default mujoco viewer callbacks from executing, except for 
        the ESC callback to close the viewer.
        """
        self.viewer.keyrepeat[key].append(fn)