Difference between revisions of "PS/2 interface"

From Deskthority wiki
Jump to navigation Jump to search
(Added speaker pins)
(Wrote a section about mouse/keyboard combo port.)
Line 6: Line 6:
 
The '''PS/2 interface''' is a serial keyboard and mouse interface developed by [[IBM]] for their PS/2 line of computers. The physical connector is a 6-pin mini-DIN, with four of the pins connected.
 
The '''PS/2 interface''' is a serial keyboard and mouse interface developed by [[IBM]] for their PS/2 line of computers. The physical connector is a 6-pin mini-DIN, with four of the pins connected.
  
Computers generally came with two PS/2 ports, one for the keyboard, and the other for the mouse. The ports were separately marked, as computers required the correct device to be inserted into each socket. Connecting a keyboard into the mouse port, or vice versa, will traditionally not work; an IBM PS/2 computer will hang on boot with a cryptic number displayed on the screen if the keyboard is mistakenly connected to the mouse port. Contrast this with with [[Apple Desktop Bus]], which was a daisy chain bus that accepted devices in any order. Modern laptops however tend to feature a single PS/2 port that can be used by either type of device.
+
Computers generally came with two PS/2 ports, one for the keyboard, and the other for the mouse. The ports were separately marked, as computers required the correct device to be inserted into each socket. Connecting a keyboard into the mouse port, or vice versa, will traditionally not work; an IBM PS/2 computer will hang on boot with a cryptic number displayed on the screen if the keyboard is mistakenly connected to the mouse port. Contrast this with with [[Apple Desktop Bus]], which was a daisy chain bus that accepted devices in any order. Modern PCs however more often tend to feature only a single PS/2 port that can be used by either type of device.
  
 
To avoid confusion in identifying the ports, the first version of the PC System Design Guide in 1997 specified that mouse and keyboard ports would be coloured purple and green (specifically, mauve and green) for keyboard and mouse respectively.
 
To avoid confusion in identifying the ports, the first version of the PC System Design Guide in 1997 specified that mouse and keyboard ports would be coloured purple and green (specifically, mauve and green) for keyboard and mouse respectively.
Line 19: Line 19:
 
==Mouse connection==
 
==Mouse connection==
 
For mice, IBM introduced a new protocol very similar to the AT interface. This replaced serial mice and older mouse connections.
 
For mice, IBM introduced a new protocol very similar to the AT interface. This replaced serial mice and older mouse connections.
 +
 +
==Combined mouse/keyboard ports==
 +
Many contemporary desktop PC motherboards, and some older laptops have only a single PS/2 port.
 +
 +
There are unfortunately different types of combined ports:
 +
* Primarily a keyboard port, but where the two pins otherwise unused by the PS/2 interface are used for mouse signals. A mouse can be connected only through a Y-splitter cable or a dedicated mouse port on a connected keyboard.
 +
* A port that can connect either a mouse or keyboard directly (through auto-detection), or both using a Y-splitter cable.
 +
* A port that can connect either a mouse or keyboard directly through auto-detection, but which do not support Y-splitter cables.
 +
 +
Y-cables should have coloured and/or labelled sockets to show which device connects to which socket. Use of it should be safe with either type of combo port except that the mouse might just not be detected at all.
 +
 +
Y-cables without any label or colour should be used only with computers that you are sure support both mouse and keyboard simultaneously and through auto-detection.
 +
 +
Keyboards with PS/2 mouse out are quite rare, typically bundled only with desktop PCs they were intended for.
  
 
==Macintosh clones==
 
==Macintosh clones==

Revision as of 01:04, 22 May 2021

This article is a stub. You can help Deskthority by expanding it.

PS/2 keyboard and mouse ports on a 2012 Dell OptiPlex 9010 SF
Combined keyboard/mouse port on a notebook computer

The PS/2 interface is a serial keyboard and mouse interface developed by IBM for their PS/2 line of computers. The physical connector is a 6-pin mini-DIN, with four of the pins connected.

Computers generally came with two PS/2 ports, one for the keyboard, and the other for the mouse. The ports were separately marked, as computers required the correct device to be inserted into each socket. Connecting a keyboard into the mouse port, or vice versa, will traditionally not work; an IBM PS/2 computer will hang on boot with a cryptic number displayed on the screen if the keyboard is mistakenly connected to the mouse port. Contrast this with with Apple Desktop Bus, which was a daisy chain bus that accepted devices in any order. Modern PCs however more often tend to feature only a single PS/2 port that can be used by either type of device.

To avoid confusion in identifying the ports, the first version of the PC System Design Guide in 1997 specified that mouse and keyboard ports would be coloured purple and green (specifically, mauve and green) for keyboard and mouse respectively.

PS/2 ports are not hot-swappable. Connecting a keyboard or mouse to a running machine can cause damage to some motherboards and/or some older operating systems to hang.

Keyboard connection

The PS/2 keyboard connection uses the same keyboard protocol as the AT keyboard interface.

On the IBM RS/6000, the two pins not used by the PS/2 protocol connect to a speaker inside the IBM Model M Enhanced Keyboard that systems came with.

Mouse connection

For mice, IBM introduced a new protocol very similar to the AT interface. This replaced serial mice and older mouse connections.

Combined mouse/keyboard ports

Many contemporary desktop PC motherboards, and some older laptops have only a single PS/2 port.

There are unfortunately different types of combined ports:

  • Primarily a keyboard port, but where the two pins otherwise unused by the PS/2 interface are used for mouse signals. A mouse can be connected only through a Y-splitter cable or a dedicated mouse port on a connected keyboard.
  • A port that can connect either a mouse or keyboard directly (through auto-detection), or both using a Y-splitter cable.
  • A port that can connect either a mouse or keyboard directly through auto-detection, but which do not support Y-splitter cables.

Y-cables should have coloured and/or labelled sockets to show which device connects to which socket. Use of it should be safe with either type of combo port except that the mouse might just not be detected at all.

Y-cables without any label or colour should be used only with computers that you are sure support both mouse and keyboard simultaneously and through auto-detection.

Keyboards with PS/2 mouse out are quite rare, typically bundled only with desktop PCs they were intended for.

Macintosh clones

The PS/2 port is typically associated with the IBM PS/2 and PC clones. However, many Macintosh clones from the late 1990s also featured PS/2 mouse and keyboard ports. One advantage of this arrangement was that you could connect a two-button PC mouse to the computer and use a program such as TheMouse2B to map the second button to control+click, thereby achieving contextual menus from the right button as with a Windows computer. Shortly after the demise of the Macintosh clone industry, Apple introduced the iMac, which featured USB ports for the mouse and keyboard; this was followed three years later with Mac OS X, with native support for multiple mouse buttons and right-click contextual menu activation.