Sponsor for PC Pals Forum

Author Topic: Useless keyboard keys explained  (Read 2701 times)

Offline Clive

  • Administrator
  • *****
  • Posts: 75153
  • Won Quiz of the Year 2015,2016,2017, 2020, 2021
Useless keyboard keys explained
« on: October 07, 2003, 16:41 »
The Straight Dope

Dear Straight Dope:

Why does my computer keyboard have this "Scroll Lock" key that seems to serve no purpose whatsoever? In 15 years I don't remember ever pushing that button. I'm almost scared to touch it --Insanegrey, Lawrence, KS

Guest contributor Una Persson replies:

Although your mother told you that there are many things to avoid touching (like downed electric lines, scorpions, and the "naughty place"), don't be afraid to touch the Scroll Lock key. Nothing bad will happen ? in fact, probably nothing at all will happen. Once upon a time, however, something did.

The Scroll Lock key has appeared on the keyboards of IBM personal computers since the original 83-key PC/XT and the 84-key AT layouts, and remains on the 101-key and greater "enhanced" keyboards currently in use. The Scroll Lock key wasn't on the original Macintosh keyboards but appears on the Mac's "enhanced" keyboard.

The main intent of the Scroll Lock key was to allow scrolling of screen text up, down and presumably sideways using the arrow keys in the days before large displays and graphical scroll bars. You can see where this might have been handy in the DOS era, when screen output typically was limited to 80 characters wide by 25 rows deep. For some types of programs, spreadsheets being the obvious example, it's still handy now. In Microsoft Excel, Scroll Lock allows you to scroll a spreadsheet with the arrow keys without moving the active cell pointer from the currently highlighted cell. In Quattro Pro, another spreadsheet program, Scroll Lock works in a similar manner, although in contrast to Excel it's not possible to scroll the active cell pointer completely off the screen.

Other programs use Scroll Lock for special functions. It's said (although I haven't personally verified this) that the Linux operating system as well as some early mainframe and minicomputer terminals employed Scroll Lock to stop text from scrolling on your screen in command-line sessions ? pausing the scrolling, in effect. The ancient DOS adventure game ?Rogue? (one of my all-time favorites) used Scroll Lock to scroll your character?s movement through the ASCII dungeons on the display.  I'm told some computers in the late 1980s used the Scroll Lock key to halt the scrolling of the boot-up messages that appeared when you started the computer. This last use may be apocryphal, as I could find no examples of computers that displayed this behavior. The point is, Scroll Lock sometimes does something besides make that little light light up.  

Other odd keys worthy of note on your keyboard include the SysRq key (sometimes appearing as SysReq), which shares the same key as the ?Print Screen? key. (Historical sidelight ? SysRq was the ?84th key? added when the 83-key PC/XT keyboard became the 84-key AT keyboard.) Unless programmed by a particular application, the SysRq key does nothing in most operating systems, including DOS, Windows, and OS/2. The SysRq key has different "hooks" into the system BIOS (basic input/output system, the interface between the software and the low-level functions of the computer) from the other keys on the keyboard. IBM evidently put this key on the keyboard to facilitate task switching in future operating systems ? that is, to allow either switching from one task to another (as on a mainframe computer), or interrupting all tasks and returning control to the keyboard. Advanced MS-DOS Programming, second edition, Microsoft Press, states:

A multitasking program manager would be expected to capture INT 15H so that it can be notified when the user strikes the SysReq key.

In layman's terms that means, "You can make a program monitor a specific location in your computer's hardware so it can do something cool (or lame, depending on your point of view) when the SysReq key is pressed." However, some new keyboards no longer feature this key, and its days seem numbered.

The Pause/Break key was used in the DOS command line environment for two different purposes. Pause could be used to pause the scrolling of text on the screen, but it also had a much more powerful function--to pause program execution in the operating system. This function still works in 32-bit DOS applications under Windows, where pressing this key while the DOS window is active can (depending on the program) pause program execution. I have several old DOS power plant analysis programs that run under OS/2, Windows NT, and Windows XP, and I can attest that the Pause key pauses execution of all of these programs. The Break key, when combined with the Ctrl key, is used to terminate DOS applications ? and still does today, even in the DOS window of Windows XP. Some DOS communication programs used the Break key as a shortcut to terminate a modem connection, but that was really a function of the program, not the operating system.

The <`> key is called many names. According to the "Hacker's Jargon FAQ," these include:

backquote, left quote, left single quote, open quote, (grave accent), grave. Rare: backprime, [backspark], unapostrophe, birk, blugle, back tick, back glitch, push, (opening single quotation mark), quasiquote.

That's nice, but what is the symbol used for? It has no operating system function in DOS or Windows (although it does find use in the UNIX operating system), and in most type fonts doesn't match the appearance of an ordinary single quote (apostrophe), so it can't really be used as an open quote mark. However, programmers, being loath to let extraneous keys sit unused on a keyboard, have found use for it as an operator in the LISP and Python programming languages.

The pipe key <|>, also known as the bar key or vertical bar, is found above the backslash key <\>. It sees frequent use in C, C++, C# and other programming languages where it serves as the "OR" symbol. A single pipe indicates "bitwise OR," and two pipes together (||) signify "logical OR." For example:

C = (A | B)

means "apply bit operations to A and B and put the result in C." That is, if A is 0000 0110, and B is 1111 0000, then the result is:

A 0000 0110
B 1111 0000
--------------
C 1111 0110

which is bit-level arithmetic. If you're not a programmer, don't worry about it. The use of double pipes, such as:

if(A > 0 || B >0)

is a logical statement that means, "If variable A is greater than 0, or variable B is greater than 0, then do something."

In command-line environments such as DOS, the pipe symbol can add functionality to a DOS command. The way I most frequently use it is when doing a directory listing (DIR) on a large directory with hundreds of files. Say I?m in the subdirectory ?C:\Una\Files,? and I type ?DIR? at the command prompt, like thus:

C:\Una\Files>DIR

. . . then the files in that directory scroll past so fast I can't see their names. However, if I apply the pipe function at the command prompt like this:

C:\Una\Files>DIR | more

. . . then the display will show me one screen of files at a time, with a "More" at the bottom. To display the next screen of files, I hit any key to continue, until all of the files in the directory have been listed (or I break, by pressing Ctrl-C). This is similar to using the "/p" modifier, such as "DIR /p," to display directory information a page at a time.

One suspects that some oddball keys were put on the PC keyboard (or to be more precise, included in the ASCII character set, most of which found its way onto the PC keyboard) because the developers figured they'd come in handy for something. On the whole that has turned out to be the case--programmers and developers have found a use for nearly every key on the keyboard, even if that use isn't obvious to the general computing public. Witness the tilde <~>, which, whatever use it may have as a diacritical mark, now can mean "home directory" or "text omitted," among other things. Given the pace of change in information technology, there's a lot to be said for designing your user interface for maximum flexibility.

http://www.straightdope.com/mailbag/mscrolllock.html


Offline Simon

  • Administrator
  • *****
  • Posts: 77923
  • First to score 7/7 in Quiz of The Week's News 2017
Re:Useless keyboard keys explained
« Reply #1 on: October 07, 2003, 16:58 »
Thanks for that Clive.  I'll definitely sleep better knowing what all those useless keys are for!

:lol:
Many thanks to all our members, who have made PC Pals such an outstanding success!   :thumb:

Offline Clive

  • Administrator
  • *****
  • Posts: 75153
  • Won Quiz of the Year 2015,2016,2017, 2020, 2021
Re:Useless keyboard keys explained
« Reply #2 on: October 07, 2003, 17:03 »
The only really important ones are Ctr/Alt/Del anyway.   ;D

Offline Simon

  • Administrator
  • *****
  • Posts: 77923
  • First to score 7/7 in Quiz of The Week's News 2017
Re:Useless keyboard keys explained
« Reply #3 on: October 07, 2003, 17:33 »
Many thanks to all our members, who have made PC Pals such an outstanding success!   :thumb:

Offline agua-moose

  • Regular Member
  • **
  • Posts: 32
Re:Useless keyboard keys explained
« Reply #4 on: January 27, 2004, 15:23 »
the ` key is also used to get to the console in lots of 3d games :)

another completely useless thing i know from back in the days of DOS just after Og invented fire, is you can switch the output of any command to go to a file instead of the screen like this:

dir > output.txt

will output a list of all the files in the current directory to the file 'output.txt'. I used to use this as a lazy way of finding files, etc in programming.

But the question that really begs to be asked is:

What's the difference between 'Alt' and 'Alt Gr'? does the Gr on the right-hand one just make it more hard-core? i wanna know dammit!
e rock hard so you don't have to, you lazy non-rocking piece of poo.

Offline Dack

  • Established Member
  • ****
  • Posts: 831
Re:Useless keyboard keys explained
« Reply #5 on: January 27, 2004, 22:01 »
Well you could try pressing ALT-GR and 4 :)

(Its the only one mapped for "Alternative Graphics)
hey promised the earth! Then delivered mud.
Technically it did meet the spec.


Show unread posts since last visit.
Sponsor for PC Pals Forum