PS/2 Interface and Protocol

With the arrival of the IBM PS/2 personal-computer series in 1987, IBM introduced the eponymous  PS/2 interface for mice and keyboards, which other manufacturers rapidly adopted. The most visible change was the use of a round 6-pin mini-DIN, in lieu of the former 5-pin connector. In default mode a PS/2 mouse communicates motion, and the state of each button, by means of 3-byte packets. For any motion, button press or button release event, a PS/2 mouse sends, over a bi-directional serial port, a sequence of three bytes, with the following format:
Get cash from your website. Sign up as affiliate.