42

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?

15
  • 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
    Commented Jul 28, 2019 at 17:46
  • 13
    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.
    – dave
    Commented Jul 28, 2019 at 17:52
  • 4
    The only piece of software I remember using SysRq was IBM TopView. Hardly anybody ever used TopView, so it didn't matter much. Commented Jul 28, 2019 at 21:33
  • 6
    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. Commented Jul 29, 2019 at 7:18
  • 4
    SysReq? On all my latest keyboards they dropped that name from the Print Screen button.
    – Mast
    Commented Jul 29, 2019 at 9:35

6 Answers 6

40

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).

7
  • 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
    Commented Jul 29, 2019 at 13:26
  • minuszerodegrees.net/keyboard/…
    – roetnig
    Commented Jul 29, 2019 at 13:38
  • 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
    Commented Jul 29, 2019 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
    Commented Jul 29, 2019 at 18:13
  • 12
    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
    Commented Jul 30, 2019 at 7:07
28

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.

2
  • 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
    Commented Jul 29, 2019 at 0:20
  • 3
    @Joe it wasn't on the PC/XT, it came with the AT
    – Raffzahn
    Commented Jul 29, 2019 at 2:05
19

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.

16

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
  • 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. Commented Jul 30, 2019 at 22:25
  • 2
    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
    Commented Sep 25, 2019 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.

0

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 {}.

14
  • 10
    The rest seems to be opinion, not an actual answer.
    – dave
    Commented Jul 29, 2019 at 11:48
  • 7
    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
    Commented Jul 29, 2019 at 13:40
  • 9
    THE CAPS LOCK KEY IS NOT AN ANNOYING NUISANCE FOR ME.
    – TheAsh
    Commented Jul 29, 2019 at 14:01
  • 8
    Apart from the first paragraph, this answer just reads as a rant.
    – Chenmunka
    Commented Jul 29, 2019 at 16:43
  • 6
    The numeric keypad is extremely useful if you're doing a lot of numerical data entry. Commented Jul 29, 2019 at 16:57

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .