# Press any key

**URL:** <https://boards.straightdope.com/t/press-any-key/610729>\
**Category:** Factual Questions\
**Created:** [January 26, 2012, 2:03pm UTC](https://boards.straightdope.com/t/press-any-key/610729 "2012-01-26T14:03:44Z")\
**Posts on this page:** 12\
**Page:** 2

<div class="post-metadata">

**Author:** ![johnpost](https://avatars.discourse-cdn.com/v4/letter/j/f17d59/32.png) [@johnpost](https://boards.straightdope.com/u/johnpost)\
**Post date:** [January 26, 2012, 6:51pm UTC](https://boards.straightdope.com/t/press-any-key/610729/21 "2012-01-26T18:51:35Z")

</div>

> [@Doug\_K](#):
>
> Also except that the message appeared all too often in the days when keyboards were not hot swappable. I’ve known a few people who fried their PS/2 ports by plugging or unplugging a keyboard without powering down first.

> [@Musicat](#):
>
> I have built over 400 computers (PCs) and never saw one that caused anything bad to happen if a keyboard was plugged in or unplugged while the computer was powered.
> 
> In fact, I keep a PS2 kbd handy when my main unit, which has all peripherals USB-connected, needs to “press F1”, since the BIOS doesn’t recognize ANY USB devices until late in the boot sequence. If I get that message, I just plug in the PS2 kbd, press a key, then remove it. Works every time.

> [@Doug\_K](#):
>
> I’ve seen it happen several times. It was always one of those things where, sure chances are nothing will happen, but if it does, the results are expensive. The manuals that came with PCs in the '90s always warned the user to power down before unplugging or plugging in anything. When USB first came out it was considered a huge breakthrough because it was hot swappable.

damage to a computer is an all depends on plugging in PS2 keyboard or mouse. i’ve seen it happen though i’ve seen it not happen more. a USB could be used with a damaged PS2 port if needed.

and USB keyboards and mice don’t activate early. in a dual boot machine i have the GRUB doesn’t respond to USB and need a PS2 which i just leave connected..

---

<div class="post-metadata">

**Author:** ![ftg](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/ftg/32/2801_2.png) [@ftg](https://boards.straightdope.com/u/ftg)\
**Post date:** [January 28, 2012, 7:42pm UTC](https://boards.straightdope.com/t/press-any-key/610729/22 "2012-01-28T19:42:38Z")

</div>

If you plug in a PS/2 or AT keyboard connector right, nothing bad should happen. But it’s easy to have it aimed a little wrong and short out a tiny surfce mount fuse on the MB. (ATs especially, but I’ve seen it on PS/2 boards.)

I fixed these MBs back in the day by desoldering the fuse and replacing it with one from a deader MB.

You have to be a bit more aggressive to do damage to USB port this way. But they go bad with surprising frequency due to faults in cables and whatnot. Hence the advice to try another USB port.

---

<div class="post-metadata">

**Author:** ![pulykamell](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/pulykamell/32/3166_2.png) [@pulykamell](https://boards.straightdope.com/u/pulykamell)\
**Post date:** [January 28, 2012, 8:23pm UTC](https://boards.straightdope.com/t/press-any-key/610729/23 "2012-01-28T20:23:27Z")

</div>

> [@Hail\_Ants](#):
>
> You don’t see this too much with a GUI (i.e. on a Mac or Windows) anymore, but it was a standard ‘pause’ method back in the days of text-only terminals & programs.
> 
> Anybody who learned BASIC will remember:
> 
> ```auto
> 
> 50 IF INKEY$="" THEN 50
> 
> ```
> 
> INKEY$ was a variable that equaled whatever key was being pressed, so as long as it equaled a null string (i.e. “”) the program looped until it equaled any character (IOW when you pressed any key).

Well, to be pedantic, on a number of computers in a simple BASIC program, it couldn’t just be any old key. For example, on a C64, pressing the Commodore key, the shift, the caps lock, or control (and perhaps restore and, well, run-stop for obvious reasons) would still equal a null string unless it was pressed in combination with another key.

---

<div class="post-metadata">

**Author:** ![drewtwo99](https://avatars.discourse-cdn.com/v4/letter/d/d07c76/32.png) [@drewtwo99](https://boards.straightdope.com/u/drewtwo99)\
**Post date:** [January 28, 2012, 9:05pm UTC](https://boards.straightdope.com/t/press-any-key/610729/24 "2012-01-28T21:05:04Z")

</div>

does pressing the SysRq key do anything at that prompt?

---

<div class="post-metadata">

**Author:** ![cochrane](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/cochrane/32/10441_2.png) [@cochrane](https://boards.straightdope.com/u/cochrane)\
**Post date:** [January 28, 2012, 11:53pm UTC](https://boards.straightdope.com/t/press-any-key/610729/25 "2012-01-28T23:53:27Z")

</div>

[Hit any key to continue.](http://www.laughnet.net/archive/toons/hammerd.jpg)

---

<div class="post-metadata">

**Author:** ![Chronos](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/chronos/32/134_2.png) [@Chronos](https://boards.straightdope.com/u/Chronos)\
**Post date:** [January 29, 2012, 3:03am UTC](https://boards.straightdope.com/t/press-any-key/610729/26 "2012-01-29T03:03:11Z")

</div>

Or then there’s “Press any key to continue, or any other key to quit”.

Yes, I did actually use that one once.

---

<div class="post-metadata">

**Author:** ![Cartoonacy](https://avatars.discourse-cdn.com/v4/letter/c/848f3c/32.png) [@Cartoonacy](https://boards.straightdope.com/u/Cartoonacy)\
**Post date:** [January 30, 2012, 11:03pm UTC](https://boards.straightdope.com/t/press-any-key/610729/27 "2012-01-30T23:03:02Z")

</div>

> [@Darth\_Panda](#):
>
> You should have to type a-n-y-k-e-y for it to continue

I remember reading a webcomic several years ago where a nearsighted user got the message “Press any key.”

He hunched down over his keyboard and pressed “A.”

The message on the screen changed to “Do you want to save your work (Y/N)?”

Still looking down, he pressed “N.”

The screen said “Are you sure (Y/N)?”

Still looking down, he pressed “Y.”

He looked up. His eyes got \*\*real \*\*big.

In the final panel, a tech sitting at the help desk hears the phone ring and thinks, “Why did I just feel a chill run down my spine?”

---

<div class="post-metadata">

**Author:** ![beowulff](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/beowulff/32/542_2.png) [@beowulff](https://boards.straightdope.com/u/beowulff)\
**Post date:** [January 30, 2012, 11:58pm UTC](https://boards.straightdope.com/t/press-any-key/610729/28 "2012-01-30T23:58:20Z")

</div>

> [@cochrane](#):
>
> [Hit any key to continue.](http://www.laughnet.net/archive/toons/hammerd.jpg)

That’s a Mac II!

---

<div class="post-metadata">

**Author:** ![Sunspace](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/sunspace/32/1250_2.png) [@Sunspace](https://boards.straightdope.com/u/Sunspace)\
**Post date:** [January 31, 2012, 12:10am UTC](https://boards.straightdope.com/t/press-any-key/610729/29 "2012-01-31T00:10:41Z")

</div>

> [@beowulff](#):
>
> That’s a Mac II!

I was thinking the same thing. And isn’t that [one of the ducks](http://198.66.201.138/characters.html) from Professor E. McSquared’s Intergalactic Calculus Primer?

---

<div class="post-metadata">

**Author:** ![Doug\_K](https://avatars.discourse-cdn.com/v4/letter/d/b5ac83/32.png) [@Doug\_K](https://boards.straightdope.com/u/Doug_K)\
**Post date:** [January 31, 2012, 3:35am UTC](https://boards.straightdope.com/t/press-any-key/610729/30 "2012-01-31T03:35:46Z")

</div>

> [@Hail\_Ants](#):
>
> You don’t see this too much with a GUI (i.e. on a Mac or Windows) anymore, but it was a standard ‘pause’ method back in the days of text-only terminals & programs.
> 
> Anybody who learned BASIC will remember:
> 
> ```auto
> 
> 50 IF INKEY$="" THEN 50
> 
> ```
> 
> INKEY$ was a variable that equaled whatever key was being pressed, so as long as it equaled a null string (i.e. “”) the program looped until it equaled any character (IOW when you pressed any key).

> [@pulykamell](#):
>
> Well, to be pedantic, on a number of computers in a simple BASIC program, it couldn’t just be any old key. For example, on a C64, pressing the Commodore key, the shift, the caps lock, or control (and perhaps restore and, well, run-stop for obvious reasons) would still equal a null string unless it was pressed in combination with another key.

To be even more pedantic, on the C64 you would use the GET command, as in

```auto

50 GET B$ : IF B$ = "" THEN 50

```

and that didn’t actually wait for a keypress, it pulled the next available character from the keyboard buffer, which could already have keystrokes waiting to be read. It was common practice to clear the keyboard buffer first, with

```auto

40 GET B$ : IF B$<>"" THEN 40

```

just in case the user had “typed ahead”, to make sure the program would really pause.

---

<div class="post-metadata">

**Author:** ![pulykamell](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/pulykamell/32/3166_2.png) [@pulykamell](https://boards.straightdope.com/u/pulykamell)\
**Post date:** [January 31, 2012, 3:41am UTC](https://boards.straightdope.com/t/press-any-key/610729/31 "2012-01-31T03:41:54Z")

</div>

> [@Doug\_K](#):
>
> To be even more pedantic, on the C64 you would use the GET command, as in
> 
> ```auto
> 
> 50 GET B$ : IF B$ = "" THEN 50
> 
> ```
> 
> and that didn’t actually wait for a keypress, it pulled the next available character from the keyboard buffer, which could already have keystrokes waiting to be read. It was common practice to clear the keyboard buffer first, with
> 
> ```auto
> 
> 40 GET B$ : IF B$<>"" THEN 40
> 
> ```
> 
> just in case the user had “typed ahead”, to make sure the program would really pause.

Or POKE 198,0 also clears the buffer.

ETA: Which reminds me. You can also do POKE 198,0 : WAIT 198,1 to clear the buffer and wait for a keypress. Basically, they correspond to line 40 and 50 quoted.

---

<div class="post-metadata">

**Author:** ![Shoeless](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/shoeless/32/7099_2.png) [@Shoeless](https://boards.straightdope.com/u/Shoeless)\
**Post date:** [February 3, 2012, 3:28am UTC](https://boards.straightdope.com/t/press-any-key/610729/32 "2012-02-03T03:28:14Z")

</div>

> [@cochrane](#):
>
> [Hit any key to continue.](http://www.laughnet.net/archive/toons/hammerd.jpg)

A project I worked on several years ago had user documentation that was commonly referred to as “The Duck Book”, because the developer who wrote the documentation had that picture on the cover with the caption “Before you do this, READ THIS!”

[Previous page](https://boards.straightdope.com/t/press-any-key/610729.md?page=1)
