Added the two functions to simulate a key press and or release.