39

Was the SysRq key ever used on any common operating system?

Google tells me it wasn't. But then how did it end up on so many keyboards?

  • 1
    What do you mean by "popular"? That it's on all PC-based keyboards today? Or that it's used a lot by modern operating systems? – Jim Nelson Jul 28 at 17:46
  • 12
    I believe its presence on the IBM PC keyboard descended from the 3270 mainframe terminal system, where for SNA-attached terminals it allowed you to send a command to the System Services Control Point. And once an IBM PC keyboard had it, the clones followed suit. – another-dave Jul 28 at 17:52
  • 3
    The only piece of software I remember using SysRq was IBM TopView. Hardly anybody ever used TopView, so it didn't matter much. – Greg Hewgill Jul 28 at 21:33
  • 4
    Does Linux qualify as "common"? Also note that the concept of a "Secure Attention Key" such as STOP on Sun was commonplace before the AT came around. – chrylis -on strike- Jul 29 at 7:18
  • 2
    SysReq? On all my latest keyboards they dropped that name from the Print Screen button. – Mast Jul 29 at 9:35
37

Before IBM PC even existed, terminal keyboards for IBM Mainframes make extensive use of the SysRq or (System Request) key. I recall using SysReq key on IBM 5251 and 5291 terminals for IBM S/36. Probably the key (and function) was already present in the 1970s IBM 3270 terminal.

Its function was to suspend the current job and display the System Request Menu. The System Request Menu allows the user to send and display messages, transfer to a second job, or end the current job.

It was included in the first IBM PC 5150 just because it was used also as a mainframe terminal (with the appropiate card).

  • 2
    I believe the mainframe association is correct, but I can't see any sign of SysRq on this 5150 keyboard: commons.wikimedia.org/wiki/File:IBM_5150_PC.JPG – Kaz Jul 29 at 13:26
  • 2
    the logo in the top left of that keyboard reads "IBM Personal Computer AT". That layout was used with the PC-AT from 1984, not the original 5150 PC of 1981. See en.m.wikipedia.org/wiki/Model_F_keyboard#Variations – Kaz Jul 29 at 14:35
  • IBM F-84 keyboard was sold in Europe with the IBM-PC 5150 and later with the XT-5160 and the PC-3270 (with card for 3270 terminal emulation) – roetnig Jul 29 at 18:13
  • 9
    Windows NT ended up needing to reinvent this. There is a key combination guaranteed to take you directly to an OS menu where you can log out, start the task manager to kill a frozen program, shut down, etc. It always guarantees that you are getting the OS; it cannot be intercepted or spoofed. However, on Windows, that is Crtl-Alt-Delete, not SysRq. – Davislor Jul 30 at 7:07
27

SysRq is popular because the PC AT was popular, and its clones were too. PC clone manufacturers copied all the features of the computers they were cloning, with the exception of BASIC in ROM, and that included SysRq — both the physical key, and its associated handling in ROM (interrupt 0x15 function 0x85).

Any OS or software running on the AT could end up relying on SysRq, so it became entrenched, even though in practice it wasn’t used much.

  • 6
    But why was SysRq on the keyboard in the first place on the PC/XT/AT? I think that was the essence of the question. – Joe Jul 29 at 0:20
  • 3
    @Joe it wasn't on the PC/XT, it came with the AT – Raffzahn Jul 29 at 2:05
18

I think you're coming at this kind of backwards. The commonly used keys are commonly used because they're on keyboards and are widely available. Software follows hardware in this instance. The system request key was put there because the hardware designers thought it would be useful, and even if they were wrong, removing keys from the standard keyboard as dictated by whatever IBM was doing would mean introducing potential incompatibilities.

15

As other answers and comments have already said, the SysRq key was first introduced with the keyboard of the PC/AT of 1984, and had parallels to similar keys on IBM mainframe keyboards.

Even if it was rarely used, keyboard manufacturers kept including it, as removing it would make their keyboard incompatible with the few pieces of software that did use it. Only in recent years have manufacturers started to drop it and other little-used keys, chiefly on laptops where space is at a premium.

So why was this key so rarely used on the home PC, rare enough that you ask whether any OS ever used it?

In the mid 1980s, only the brand-new AT (and compatibles) would have the SysRq key. If a software developer wanted to support the older XT and PC machines, they'd have to stick to using keys that existed on both keyboard variants. New versions of MS-DOS, for example, couldn't use it without losing backward compatibility with earlier machines.

As described on Wikipedia's page about the SysRq* key, it behaves differently to all other keys on the keyboard, and bypasses the keyboard buffer and the OS' usual input processing. Pressing SysRq can only be detected with a dedicated BIOS function (int. 0x15, function 0x85). Under DOS, any user application could access the BIOS functions directly, but that was no longer possible under Windows. For good or ill, the developers of Windows saw no need to make special use of this special key, other than some specialist debugging purposes.

Linux, however, does use it. The 'magic SysRq key' can be used to issue simple commands to an unresponsive computer: remounting filesystems, terminating processes, or restarting the machine. This uses SysRq's ability to bypass the normal keyboard-handling interface, and issue signals directly to the underlying operating system.

*Note: At the time of writing, the SysRq article on Wikipedia includes a weakly sourced claim that the key was meant for switching between operating systems on the PC/AT

  • 2
    I might be mistaken, but I think I might remember it being used in DesqView, maybe? That was years ago, so my memory of that is fuzzy. – riffraff169 Jul 30 at 22:25
  • 1
    SysRq's "ability to bypass the normal keyboard-handling interface" is restricted to the PC BIOS. Other operating systems like Linux that drive the hardware directly can treat it specially if they choose, but are not required to. – john_e Sep 25 at 8:39
8

As for how it got on keyboards, I'd assume that's because the basic 104+ key IBM style keyboard had it.

Though you might not use it often, it's still got a purpose. On linux, hitting alt+sysreq allows you to send messages to the kernel even if everything else is locked up. https://en.wikipedia.org/wiki/Magic_SysRq_key I've had to use it to reboot a number of times.

1

History. It was on the original IBM keyboard for the IBM PC. Later, IBM rearranged the keys on the keyboard, but they kept the original keys. Most keyboard manufacturers copied the IBM layout because "IBM compatibility" was a big deal back then.

There are lots of useless keys on standard keyboards. There's the entire "numeric keypad" with the number-key arrangement upside down. (OK, accountants probably use it.) There's the Caps Lock key, whose existence is an annoying nuisance for most people.

For a really annoying keyboard, take a look at the Swiss keyboard. There's a key devoted to § and ° , and in order to make room for ü and some accented letters, it sacrifices | and ~ while also requiring awkward alt-key combinations for {}.

  • 9
    The rest seems to be opinion, not an actual answer. – another-dave Jul 29 at 11:48
  • 6
    Actually, the number-key arrangement on phones is the one that is "upside down". The first keypads were on mechanical adding machines, and computer keyboards copy that arrangement. When touch-tone (DTMF) was invented, the arrangement was intentionally inverted because some users would otherwise type too fast for the tone-recognizing circuitry. – DrSheldon Jul 29 at 13:40
  • 9
    THE CAPS LOCK KEY IS NOT AN ANNOYING NUISANCE FOR ME. – TheAsh says Reinstate Monica Jul 29 at 14:01
  • 7
    Apart from the first paragraph, this answer just reads as a rant. – Chenmunka Jul 29 at 16:43
  • 6
    The numeric keypad is extremely useful if you're doing a lot of numerical data entry. – David Richerby Jul 29 at 16:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.