Hacker News new | ask | show | jobs
by bakli 2479 days ago
I don't even remember why scroll lock exists
9 comments

It's an early implementation of the same idea as the mouse scroll wheel. Engage scroll lock, and the arrow keys are used for scrolling the current text view instead of moving the cursor.

The idea of also using it to pause scrolling console text, I think, originated in Linux.

There was a PC Magazine utility from the 80s, WAITASEC.COM, that allowed you to use Scroll Lock to page through command output that had scrolled off the screen.
On a Linux/Unix non-X system terminal, enabling Scroll Lock makes the Up and Down arrows function like a scroll wheel instead of iterating over command history like they usually would.
I think only Lotus 1-2-3 actually used it, but Lotus 1-2-3 was literally the entire reason to use early PCs. With Scroll Lock active, in Lotus the movement keys would shift the whole spreadsheet, keeping the current cell highlight steady on the screen, rather than move the current cell highlight.
It's handy to lock your cursor on the right PC if you use Synergy [1] but aside from that I've never used it

[1] https://symless.com/synergy

At this point: Excel users.
On fullsize keyboards, Num Lock is less useful than Scroll Lock.
Numlock would make a lot more sense if fullsize keyboards both didn't have arrow keys at all and also split the 0 numpad key into numlock & 0, so that way it's easier/simpler/ergonomic to toggle. We could also do away with Page Up, Page Down, Home, End, Delete, and Insert, since they're already integrated into the numlock key.
The numlock key exists today because of the keyboard layout of the original IBM PC (https://en.wikipedia.org/wiki/File:IBM_Model_F_XT.png).

That original keyboard did not have separate arrow and pgup/pgdown (cursor control) keys, and numlock was how one toggled between the calculator keypad being 'numbers' vs. cursor controls (see the image above). The current 'separated' cursor controls and number pad layout arrived sometime during the IBM AT era, and at that point the 'numlock' key started to make less sense. It was kept around for backwards compatibility with old software that used the state of the numlock key to change its behavior (and/or that relied on the exact scan codes output by the number keypad in combination with the state of the numlock bit).

You see, my comment was made because I do believe that numlock makes sense. The ANSI layout is wider than it needs to be because of duplicate keys separating the main area from the numpad. Remove those keys, move the numpad further in, put numlock in a more ergonomic spot, and now they everyday keyboard has become more compact, ergonomic, and useful.
I knew, but had always wondered why anyone needed it.

Then, one day, on a bare terminal, output was flying by that I needed to read. The lightbulb went on, and I pressed the key.

I map it to lock the screen which makes so much more sense!
Thank baby jeebus for Wikipedia:

https://en.wikipedia.org/wiki/Scroll_Lock