Scroll Lock: Difference between revisions

From Wikipedia, the free encyclopedia
Jump to navigation Jump to search
imported>Dingolover6969
Include ScrLk in lede and add some citations for the arrows (one of which I've changed, to the thinner type of arrow, which I was able to find a reference for).
 
imported>ClueBot NG
m Reverting possible vandalism by Juggpro100 to version by Dgpop. Report False Positive? Thanks, ClueBot NG. (4438992) (Bot)
 
Line 23: Line 23:


This behavior emulates the Hold Screen key or similar flow control mechanisms on computer terminal hardware.
This behavior emulates the Hold Screen key or similar flow control mechanisms on computer terminal hardware.
The behavior should be distinguished from pressing the [[Pause key]] during [[Power-on self-test|POST]] or under [[DOS]], which, by default, has the effect of temporarily halting the running process.


On the [[FreeBSD]] system console, the {{keypress|Scroll Lock}} key not only pauses output, but additionally enables scrolling: after pressing {{keypress|Scroll Lock}}, one can use {{keypress|Page Up}} and {{keypress|Page Down}} to scroll up or down. Pressing {{keypress|Scroll Lock}} again disables this mode and moves back to the bottom of the output. The Linux console implemented this behaviour by using {{keypress|Shift|Page Up}} and {{keypress|Shift|Page Down}}, not requiring {{keypress|Scroll Lock}} to be active; this behavior has been removed due to a vulnerability (CVE-2020-14390).<ref>{{Cite web |title=Linux 5.9 Dropping Soft Scrollback Support From FB + VGA Console Code |url=https://www.phoronix.com/news/Linux-5.9-Drops-Soft-Scrollback |access-date=2022-12-22 |website=www.phoronix.com |language=en}}</ref> The [[NetBSD]] console can be scrolled either with {{keypress|Shift|Page Up}}/ {{keypress|Shift|Page Down}} or by pressing {{keypress|Scroll Lock}} then {{keypress|Page Up}}/{{keypress|Page Down}} .
On the [[FreeBSD]] system console, the {{keypress|Scroll Lock}} key not only pauses output, but additionally enables scrolling: after pressing {{keypress|Scroll Lock}}, one can use {{keypress|Page Up}} and {{keypress|Page Down}} to scroll up or down. Pressing {{keypress|Scroll Lock}} again disables this mode and moves back to the bottom of the output. The Linux console implemented this behaviour by using {{keypress|Shift|Page Up}} and {{keypress|Shift|Page Down}}, not requiring {{keypress|Scroll Lock}} to be active; this behavior has been removed due to a vulnerability (CVE-2020-14390).<ref>{{Cite web |title=Linux 5.9 Dropping Soft Scrollback Support From FB + VGA Console Code |url=https://www.phoronix.com/news/Linux-5.9-Drops-Soft-Scrollback |access-date=2022-12-22 |website=www.phoronix.com |language=en}}</ref> The [[NetBSD]] console can be scrolled either with {{keypress|Shift|Page Up}}/ {{keypress|Shift|Page Down}} or by pressing {{keypress|Scroll Lock}} then {{keypress|Page Up}}/{{keypress|Page Down}} .

Latest revision as of 02:20, 27 October 2025

Template:Short description Template:Use dmy dates Template:Use list-defined references

File:Scroll-lock.jpg
The scroll-lock key with an activated indicator light on an IBM Model M keyboard.

Scroll Lock or ScrLk[1] (sometimes notated [2] or [3]) is a lock key (typically with an associated status light) on most IBM-compatible computer keyboards. Depending on the operating system, it may be used for different purposes, and applications may assign functions to the key or change their behavior depending on its toggling state.[4][5] The key is not frequently used, and therefore some reduced or specialized keyboards lack Template:Keypress altogether.

Pressing Template:Keypress performs the same function as pressing Template:Keypress. This behavior is a remnant of the original IBM PC keyboards, which did not have a dedicated [[Break (Pause)|Template:Keypress]] key. Instead, they assigned the Pause function to Template:Keypress and the Break function to Template:Keypress.

Function

Window scrolling

The Template:Keypress key is meant to lock all scrolling techniques and is a vestige of the original IBM PC keyboard. In its original design, Template:Keypress was intended to modify the behavior of the arrow keys. When the Template:Keypress mode is on, the arrow keys scroll the contents of a text window instead of moving the cursor.[4][5] In this usage, Template:Keypress is a toggling lock key like Num Lock or Caps Lock, which have a state that persists after the key is released.

Today, this particular use of Template:Keypress is rare. Modern programs honoring this behavior include Microsoft Excel, Microsoft Project,[6] Image-Line FL Studio,[7] IBM Lotus Notes, Forté Agent, Renoise, Cakewalk by BandLab, and LibreOffice Calc.

Some text editors (such as Notepad++, Microsoft Visual Studio) exhibit similar behavior when the arrow keys are used with [[Control key|Template:Keypress]] pressed.

Most GUI environments neglect Template:Keypress, which means scrolling must be accomplished with a mouse, using means such as scrollbars or scroll wheels, or an "autoscroll" feature activated by the middle mouse button (which may be part of the scroll wheel). In some instances, Template:Keypress+Template:Keypress in conjunction with the arrow keys can enable scrolling.

Some web browsers including Google Chrome, Firefox, and Internet Explorer support a caret browsing mode which can be toggled by Template:Keypress. While the window scrolling behavior with caret navigation disabled (the default) is similar to that suggested for Scroll Lock, enabling caret navigation will enable a cursor scrolling behavior as if Scroll Lock were disabled.

Console scrolling

Pressing the Template:Keypress key in the Linux console while the text is scrolling through the screen freezes the console output (but not input) during which no further text is sent to the screen, while the program continues running as usual — or becomes blocked at the Template:Mono syscall when too much data is prevented from reaching the terminal, causing the tty's output queue to become full if the tty file descriptor is not using non-blocking I/O. When Template:Keypress is pressed again, the screen is unfrozen and all text generated during the freeze is displayed at once and the program continues to run normally. This allows the user to pause the display and read long log messages that scroll through the screen too quickly to read, such as when the system is booting up (provided the keyboard driver has already been loaded). Unless configured otherwise or in raw mode, Template:Keypress (DC3 in ASCII) and Template:Keypress (DC1 in ASCII) can be used instead of Scroll Lock in Unix-like systems to freeze and unfreeze the tty output respectively.

This behavior emulates the Hold Screen key or similar flow control mechanisms on computer terminal hardware.

On the FreeBSD system console, the Template:Keypress key not only pauses output, but additionally enables scrolling: after pressing Template:Keypress, one can use Template:Keypress and Template:Keypress to scroll up or down. Pressing Template:Keypress again disables this mode and moves back to the bottom of the output. The Linux console implemented this behaviour by using Template:Keypress and Template:Keypress, not requiring Template:Keypress to be active; this behavior has been removed due to a vulnerability (CVE-2020-14390).[8] The NetBSD console can be scrolled either with Template:Keypress/ Template:Keypress or by pressing Template:Keypress then Template:Keypress/Template:Keypress .

Boot diagnostics

In Multiuser DOS, System Manager, and REAL/32, activating Template:Keypress during boot will always enter a special diagnostic mode, where the operating system and loaded device drivers will display detailed status and debugging information about themselves and their interaction with the operating system, sometimes up to several screenfulls per loaded driver.[9] Automatic scrolling is suspended for as long as Template:Keypress remains activated.[10]

DR-DOS 7.02 and higher provides a CONFIG.SYS directive named SCROLLOCK=ON|OFF to change the Scroll Lock status on the fly.[9] Activating Template:Keypress during boot will enter a DIAG mode as well, wherein some special drivers may display more verbose messages,[9] but in contrast to the situation under the Multiuser DOS family normal DOS drivers do not typically display additional information. The operating system, however, will temporarily suspend any automatic timeouts (TIMEOUT=<seconds>,<character>,<switch>) in CONFIG.SYS trace (TRACE=ON|OFF) and Template:Keypress/Template:Keypress single-stepping modes for as long as Template:Keypress is active.[9]

Debugging

In the Microsoft Windows NT family starting with Windows 2000, a debugging feature can be enabled, that allows the user to manually crash the system, generating a memory dump for analysis of the current state of the operating system. This can be accomplished by setting the REG_DWORD registry key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\i8042prt\Parameters\CrashOnCtrlScroll to 1. Once set, the user can hold the Template:Keypress key and tap the Template:Keypress key twice to trigger a Blue Screen of Death.[11][12]

In Microsoft Visual Basic 5.0 and 6.0, Template:Keypress pauses the running program in the integrated development environment, as does its alias Template:Keypress.

Script error: No such module "anchor".Copy and paste

In conjunction with the alternative DOS keyboard and console drivers FreeKEYB and K3PLUS, Template:Keypress also serves as part of a copy & paste facility between applications. Compared to the standard keyboard driver KEYB these drivers offer several extensions including an extended keystroke buffer with key stacking facility, macro recorder, and a second cursor called CopyCursor, which can be invoked on demand (by default on pressing Template:Keypress or the middle mouse button) and freely move on the screen using the cursor keys or the mouse, even outside the area reachable by the standard cursor in the running application. Once invoked, pressing Template:Keypress (or the left mouse button) the characters under the CopyCursor can be stuffed, one after another, into the keyboard buffer, from where they will be read by the running application as emulated key (or Alt Numpad) input, thereby typically showing up at the location of the standard cursor. The CopyCursor will move to the next screen position after each Template:Keypress (or backwards with each Template:Keypress). Normal keyboard input is possible while the CopyCursor is enabled, and the user can switch between the two cursors by toggling the Template:Keypress hotkey again. Pressing Template:Keypress or Template:Keypress exits the CopyCursor, so that, on its next invocation, it will show up at the position of the standard cursor again rather than at its previous location. If the screen contents are scrolled, the position of the CopyCursor will move accordingly until reaching the display limits. With Template:Keypress activated, keypresses will still reach the normal keystroke buffer, while CopyCursor input will be stacked up internally for later use in a second queue, dynamically maintained within the extended keystroke buffer. Thereby, it is possible to "collect" selected screen output from different programs and spool out the data much later while within yet another application by toggling Template:Keypress off again. It is also possible to use this as input into the macro recorder for later use as scrap macro. Since this is an integral part of these keyboard drivers, it is fully transparent to running software and therefore works with virtually any DOS program, including at the command prompt, temporary shelled programs, and task switchers.[13][14][15]

Other uses

IBM PC documentation called Template:Keypress an "inactive key". When PC Magazine asked an executive of keyboard manufacturer Key Tronic about the key's purpose in a 1983 interview, he replied "I don't know, but we put it on ours, too."[16]

The indicator light is sometimes used for other purposes such as a keyboard layout indicator[17][18] in some Linux distributions or other applications,[19] because doing so is less likely to cause problems than manipulating other keys/lights.

Keyboard, video, mouse switches (KVM) often use the Scroll Lock key on the keyboard connected to the KVM switch for selecting between computers. On KVM switches with On-screen display (OSD), a "double click" of the Scroll Lock key often brings up the OSD, allowing the user to select the desired computer from a list or access the configuration menu of the KVM. Some models, especially those without an OSD, switch to the input corresponding to the number key pressed after Scroll Lock, or in the case of some two-port switches, the up and down arrow keys. Simple models with only two or four inputs may immediately switch to the next input following a double press of the Scroll Lock key.

Scroll Lock on keyboards without a Scroll Lock key

Laptops and keyboards without a physical Template:Keypress key[20] may have a second function on another key that acts as if a Template:Keypress key is activated.

Some common methods are:

Another way to press Template:Keypress is to use an on-screen keyboard. In Windows 8 and later versions, it can be found in the "Windows Ease of Access" program group. This will provide access to an emulation of a standard 101/102-key keyboard.[22]

See also

References

Template:Reflist

External links

  • Script error: No such module "URL".Script error: No such module "Check for unknown parameters".
<templatestyles src="Navbar-header/styles.css"/>
Esc F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 PrtScn/
SysRq
Scroll
Lock
Pause/
Break

Error: Image is invalid or non-existent.

Insert Home PgUp Num
Lock
Delete End PgDn 7 8 9 +
4 5 6
1 2 3 Enter
   0
   Ins
 . 
Del

Template:Keyboard keys

  1. Script error: No such module "citation/CS1".
  2. Graphic is seen enclosed in rounded rectangle on scroll lock key in photograph in Script error: No such module "citation/CS1".
  3. Graphic is seen enclosed in rounded rectangle on scroll lock key in photograph in Script error: No such module "citation/CS1".
  4. a b Cite error: Invalid <ref> tag; no text was provided for refs named IBM_Owners_Manual
  5. a b Cite error: Invalid <ref> tag; no text was provided for refs named IBM_1983_PC-TR
  6. Cite error: Invalid <ref> tag; no text was provided for refs named Microsoft_Project
  7. Script error: No such module "citation/CS1".
  8. Script error: No such module "citation/CS1".
  9. a b c d Cite error: Invalid <ref> tag; no text was provided for refs named Paul_1997_OD-A3
  10. Cite error: Invalid <ref> tag; no text was provided for refs named CCI_1997_HELP
  11. Cite error: Invalid <ref> tag; no text was provided for refs named Microsoft_KB233139
  12. Cite error: Invalid <ref> tag; no text was provided for refs named Dialy_2000_Tricks
  13. Cite error: Invalid <ref> tag; no text was provided for refs named Paul_1995_K3PLUS
  14. Cite error: Invalid <ref> tag; no text was provided for refs named Paul_1997_FreeKEYB
  15. Cite error: Invalid <ref> tag; no text was provided for refs named Paul_2006_FreeKEYB
  16. Cite error: Invalid <ref> tag; no text was provided for refs named sandler198301
  17. Cite error: Invalid <ref> tag; no text was provided for refs named Ubuntu
  18. Cite error: Invalid <ref> tag; no text was provided for refs named Gnome
  19. Cite error: Invalid <ref> tag; no text was provided for refs named Keyboard_illuminator
  20. Cite error: Invalid <ref> tag; no text was provided for refs named Logitech
  21. Cite error: Invalid <ref> tag; no text was provided for refs named Dell
  22. Cite error: Invalid <ref> tag; no text was provided for refs named Microsoft_Windows-8