A utility class for handling multiple key events and executing a callback function based on the key states.