The design of a computer keyboard with dual function is proposed. This computer keyboard called Dual Keyboard can function both as a normal keyboard and as a pressure sensitive keyboard. The proposed device has a switch that decides the function. The keyboard makes use of sensors placed beneath the keys to measure the pressure applied on the key by the user. This device has many applications. In this paper, it is applied to mitigate Denial of Service (DoS) attack.