Add Pause function

Add Pause function by pressing the key "p"
Upper case support

add upper case support