Change KeyPress() method to work with real devices