Esc

Updated: 09/12/2023 by Computer Hope

Esc may refer to any of the following:

Esc key on the keyboard

1. Short for Escape, Esc is a key found on the top-left corner of a computer keyboard. It allows the user to abort, cancel, or close an operation. For example, if a web page loads slowly on an Internet browser, pressing the Escape key stops the download. The picture of what the Esc key looks like on a computer keyboard.

Where is the Escape key on the keyboard?

Below is an overview of a computer keyboard with the Esc key highlighted in blue.

Esc key

Note

Apple Macbooks with the Touch Bar do not have a physical Esc key.

Why and where is the Esc key used?

An Escape key is used in a program when you want to abort, cancel, or change what is currently displayed on the screen. Below are some different places where the Escape key is commonly used.

Does Esc close out of a program?

Generally, Esc does not completely close out of a program. However, as mentioned above, it can cancel or close the operations of a program. To close or exit out of a program, see our close page for all the ways to close out of a program completely. If a computer is frozen or a program cannot be closed, see: What should I do when a computer freezes or locks up?

Does the Esc key send a break?

The Esc key was used to send a break with some early computers. However, the Esc key is not used to perform a break today. With a PC, press Ctrl+C to send a break and stop a loop.

What keyboard shortcuts use the Esc key?

Below are links to keyboard shortcuts that use the Esc key.

How many Esc keys are on a keyboard?

There's always only one Esc key for computer keyboards with an Esc key. Some keyboards, like the keyboard used with MacBooks with a Touch Bar, don't have an Esc key.

2. Escape is shorthand for an escape character. An escape character is a single backward slash ( \ ) in Linux, programming, and regular expressions that treat a character as text and not a function. It can also be used to perform a special function. Below are examples of how an escape could be used.

\" or \'

The above example treats the quote character as a quote character, not a beginning or end container. For example, in programming languages such as Perl, this is required to print text to the screen containing a quote. In other words, the command print "Example of a \" quote."; would print Example of a " quote. Without escaping the quote, the Perl script would generate an error because of the extra quote.

\*

The example above would treat the asterisk as a plain text asterisk, not a wildcard or metacharacter.

\.

A period is also a wildcard, which represents any single character. So, to match a period in a regular expression and not every character, you must escape it to be recognized as a period.

\

When a file name or directory needs a space in Linux, you can use a backward slash followed by a space to escape the space in a name. If this isn't done, Linux treats anything after the space as an option or additional command.

\n

Finally, escape characters are also used to create a function or command in escape sequences. For example, the above \n would create a newline character to the file or screen. See our escape sequence page for additional examples.

3. Short for escalation, esc describes or refers to an escalation number dealing with an important customer-related issue.

Cancel, Escape sequence, Keyboard terms, Magic quotes, Meta-character, Programming terms, Stop