Rewrote the multi method for key-pressed