Backtick

Last updated

`
Backtick
In  Unicode U+0060`GRAVE ACCENT (symbol)
Graphical variants
U+FF40FULLWIDTH GRAVE ACCENT
Related
See alsoU+0300̀ COMBINING GRAVE ACCENT (diacritic)

The backtick` is a typographical mark used mainly in computing. It is also known as backquote, grave, or grave accent .

Contents

The character was designed for typewriters to add a grave accent to a (lower-case [a] ) base letter, by overtyping it atop that letter. [1] On early computer systems, however, this physical dead key+overtype function was rarely supported, being functionally replaced by precomposed characters. [b] Consequently, this ASCII symbol was rarely (if ever) used in computer systems for its original aim and became repurposed for many unrelated uses in computer programming.

The sign is located on the left-top of a US or UK layout keyboard, next to the 1 key. [c] On older keyboards, the Escape key was at this location, and the backtick key was somewhere on the right side of the layout. Provision (if any) of the backtick on other keyboards varies by national keyboard layout and keyboard mapping.

History

Typewriters

Typewriter with French (AZERTY) keyboard:
a,
e,
e,
c
u have dedicated keys; the circumflex and diaeresis accents have dead keys. Write machine.jpg
Typewriter with French (AZERTY) keyboard: à, è, é, çù have dedicated keys; the circumflex and diaeresis accents have dead keys.
Spanish typewriter (QWERTY keyboard) with dead keys for acute, circumflex, diaeresis and grave accents. Idazmakina.jpg
Spanish typewriter (QWERTY keyboard) with dead keys for acute, circumflex, diaeresis and grave accents.

On typewriters designed for languages that routinely use diacritics (accent marks), there are two possible solutions. Keys can be dedicated to pre-composed characters or alternatively a dead key mechanism can be provided. With the latter, a mark is made when a dead key is typed but, unlike normal keys, the paper carriage does not move on and thus, the next letter to be typed is printed under the accent.

Incorporation into ISO 646 and ASCII

The incorporation of the grave symbol into ASCII is a consequence of this prior existence on typewriters. This symbol did not exist independently as a type or hot-lead printing character.

It appears to have been at their May 13–15, 1963 meeting that the CCITT decided that the proposed ISO 7-bit code standard would be suitable for their needs if a lower case alphabet and five diacritical marks, including the grave accent, were added to it. At the October 29–31 meeting, then, the ISO subcommittee altered the ISO draft to meet the CCITT requirements, replacing the up-arrow and left-arrow with diacriticals, adding diacritical meanings to the apostrophe and quotation mark, and making the number sign a dual for the tilde. [2]

Yucca's free information site

Thus, ISO 646 was born and the ASCII standard updated to include the backtick and other symbols. [d]

As surrogate of apostrophe or (opening) single quote

Some early typewriters and ASCII peripherals designed the backtick and apostrophe to be mirror images of each other. [3] This allowed them to be used as matching pairs of open and close quotes, and also as grave and acute accents, and allowed the apostrophe to be used as a prime. None of these were considered typographically correct.

The use of apostrophe for opening quotes, the need on some typewriters to overprint apostrophe and period to get an exclamation mark, and the lack of a mirrored double-quote character, tended to change the apostrophe to the modern "typewriter" design that is vertical, so this no longer works. Unicode now provides separate characters for opening and closing quotes.

Such style is sometimes used even nowadays; examples are: output generated by some UNIX console programs, rendering of man pages within some environments, technical documentation written long ago or written in old-school manner. However, as time goes on, such style is used less and less, and even institutions that traditionally were using that style are now abandoning it. [4] [5]

Computing

Command-line interface languages

Many command-line interface languages and the scripting (programming) languages like Perl, PHP, Ruby and Julia (though see below) use pairs of backticks to indicate command substitution. A command substitution is the standard output from one command, into an embedded line of text within another command. [6] [7] For example, using $ as the symbol representing a terminal prompt, the code line:

$ echo"It is now `date`"It is now Thu Nov 7 21:37:35 UTC 2024

In all POSIX shells (including Bash and Zsh), the use of backticks for command substitution is now largely deprecated in favor of the notation $(...), so that the example above would be re-written:

$ echo"It is now $(date)"

The new syntax allows nesting, for example:

$ echo"An absolute path to the 'zcat' command is $(readlink-e"$(type-Pzcat)")"An absolute path to the 'zcat' command is /usr/bin/gzip

Markup languages

It is sometimes used in source code comments to indicate code, e.g.,

/* Use the `printf()` function. */

This is also the format the Markdown formatter uses to indicate code. [8] Some variations of Markdown support "fenced code blocks" that span multiple lines of code, starting (and ending) with three backticks in a row (```). [9]

Programming languages

constname="Mary",pet="lamb";// Set variableslettemp=`${name} has a little ${pet}!`;console.log(temp);// => "Mary has a little lamb!";

Games

In many PC-based computer games in the US and UK, the ` key is used to open the console so the user can execute script commands via its CLI. [ citation needed ] This is true for games such as Factorio , Battlefield 3 , Half-Life , Halo CE , Quake , Half-Life 2 , Blockland , Soldier of Fortune II: Double Helix , Unreal , Counter-Strike , Crysis , Morrowind , Oblivion , Skyrim , [13] Fallout: New Vegas , Fallout 3 , Fallout 4 , RuneScape , and games based on the Quake engine or Source engine. [ citation needed ] While not necessarily the original progenitor of the console key concept, Quake is still widely associated with any usage of the ` key as a toggle for a drop-down console, often being referred to as the "Quake Key". In 2021, Windows Terminal introduced a "Quake Mode" which enables a global shortcut of ⊞ Win+` that opens a terminal window pinned to the top half of the screen. [14]

See also

Notes

  1. Upper case letters would require the character to be printed higher on the page
  2. In ISO/IEC 8859-1 ("ISO Latin 1") and subsequently in Unicode.
  3. With US keyboards, the same key produces the free-standing tilde ~ if shift is held down. On UK keyboards, ⇧ Shift+` produces the “logical not” symbol, ¬, unless reallocated.
  4. ISO 646 (and ASCII, which it includes) is a standard for 7-bit encoding, providing just 96 printable characters (and 32 control characters). This was insufficient to meet the needs of Western European languages and so the standard specifies certain code points that are available for national variation. The code point allocated to backtick is 0x60 (decimal 96) is one such. Consequently, code-point 0x60 was often reallocated in local character sets to a more useful character. For example, in the French ISO 646 standard, the character at this position is μ . Many older UK computers (such as the ZX Spectrum and BBC Micro) have the pound sign (£) symbol at character 0x60, although BS 4730 (the British ISO 646 variant) placed '£' at position 0x23 instead. With the arrival of 8-bit "extended ASCII", this issue was largely mitigated, though not fully resolved until Unicode was established.

Related Research Articles

<span class="mw-page-title-main">ASCII</span> American character encoding standard

ASCII, an acronym for American Standard Code for Information Interchange, is a character encoding standard for electronic communication. ASCII codes represent text in computers, telecommunications equipment, and other devices. ASCII has just 128 code points, of which only 95 are printable characters, which severely limit its scope. The set of available punctuation had significant impact on the syntax of computer languages and text markup. ASCII hugely influenced the design of character sets used by modern computers, including Unicode which has over a million code points, but the first 128 of these are the same as ASCII.

<span class="mw-page-title-main">ISO/IEC 8859-1</span> Character encoding

ISO/IEC 8859-1:1998, Information technology—8-bit single-byte coded graphic character sets—Part 1: Latin alphabet No. 1, is part of the ISO/IEC 8859 series of ASCII-based standard character encodings, first edition published in 1987. ISO/IEC 8859-1 encodes what it refers to as "Latin alphabet no. 1", consisting of 191 characters from the Latin script. This character-encoding scheme is used throughout the Americas, Western Europe, Oceania, and much of Africa. It is the basis for some popular 8-bit character sets and the first two blocks of characters in Unicode.

<span class="mw-page-title-main">QWERTY</span> Keyboard layout for Latin-script alphabets

QWERTY is a keyboard layout for Latin-script alphabets. The name comes from the order of the first six keys on the top letter row of the keyboard: QWERTY. The QWERTY design is based on a layout included in the Sholes and Glidden typewriter sold via E. Remington and Sons from 1874. QWERTY became popular with the success of the Remington No. 2 of 1878 and remains in ubiquitous use.

In computing and telecommunications, an escape character is a character that invokes an alternative interpretation on the following characters in a character sequence. An escape character is a particular case of metacharacters. Generally, the judgement of whether something is an escape character or not depends on the context.

The tilde is a grapheme ˜ or ~ with a number of uses. The name of the character came into English from Spanish tilde, which in turn came from the Latin titulus, meaning 'title' or 'superscription'. Its primary use is as a diacritic (accent) in combination with a base letter. Its freestanding form is used in modern texts mainly to indicate approximation.

A carriage return, sometimes known as a cartridge return and often shortened to CR, <CR> or return, is a control character or mechanism used to reset a device's position to the beginning of a line of text. It is closely associated with the line feed and newline concepts, although it can be considered separately in its own right.

<span class="mw-page-title-main">AZERTY</span> Keyboard layout used for French

AZERTY is a specific layout for the characters of the Latin alphabet on typewriter keys and computer keyboards. The layout takes its name from the first six letters to appear on the first row of alphabetical keys; that is,. Similar to the QWERTZ layout, it is modelled on the English QWERTY layout. It is used in France and Belgium, although each of these countries has its own national variation on the layout. Luxembourg and Switzerland use the Swiss QWERTZ keyboard. Most residents of Quebec, the mainly French-speaking province of Canada, use a QWERTY keyboard that has been adapted to the French language such as the Multilingual Standard keyboard CAN/CSA Z243.200-92 which is stipulated by the government of Quebec and the Government of Canada.

<span class="mw-page-title-main">Pound sign</span> Currency sign

The pound sign is the symbol for the pound unit of sterling – the currency of the United Kingdom and its associated Crown Dependencies and British Overseas Territories and previously of Great Britain and of the Kingdom of England. The same symbol is used for other currencies called pound, such as the Egyptian and Syrian pounds. The sign may be drawn with one or two bars depending on personal preference, but the Bank of England has used the one-bar style exclusively on banknotes since 1975.

The vertical bar, |, is a glyph with various uses in mathematics, computing, and typography. It has many names, often related to particular meanings: Sheffer stroke, pipe, bar, or, vbar, and others.

<span class="mw-page-title-main">Alt key</span> Computer key

The Alt keyAlt on a computer keyboard is used to change (alternate) the function of other pressed keys. Thus, the Alt key is a modifier key, used in a similar fashion to the Shift key. For example, simply pressing A will type the letter 'a', but holding down the Alt key while pressing A will cause the computer to perform an Alt+A function, which varies from program to program. The international standard ISO/IEC 9995-2 calls it Alternate key. The key is located on either side of the space bar, but in non-US PC keyboard layouts, rather than a second Alt key, there is an 'Alt Gr' key to the right of the space bar. Both placements are in accordance with ISO/IEC 9995-2. With some keyboard mappings, the right Alt key can be reconfigured to function as an AltGr key although not engraved as such.

<span class="mw-page-title-main">ArmSCII</span> Set of obsolete single-byte character encodings

ArmSCII or ARMSCII is a set of obsolete single-byte character encodings for the Armenian alphabet defined by Armenian national standard 166–9. ArmSCII is an acronym for Armenian Standard Code for Information Interchange, similar to ASCII for the American standard. It has been superseded by the Unicode standard.

<span class="mw-page-title-main">Backspace</span> Key on a keyboard

Backspace is the keyboard key that in typewriters originally pushed the carriage one position backwards, and in modern computer systems typically moves the display cursor one position backwards, deletes the character at that position, and shifts back any text after that position by one character.

<span class="mw-page-title-main">Compose key</span> Computer key to initiate glyph merger

A compose key is a key on a computer keyboard that indicates that the following keystrokes trigger the insertion of an alternate character, typically a precomposed character or a symbol.

The hyphen-minus symbol - is the form of hyphen most commonly used in digital documents. On most keyboards, it is the only character that resembles a minus sign or a dash so it is also used for these. The name hyphen-minus derives from the original ASCII standard, where it was called hyphen (minus). The character is referred to as a hyphen, a minus sign, or a dash according to the context where it is being used.

Quotation marks are punctuation marks used in pairs in various writing systems to identify direct speech, a quotation, or a phrase. The pair consists of an opening quotation mark and a closing quotation mark, which may or may not be the same glyph. Quotation marks have a variety of forms in different languages and in different media.

A typographic approximation is a replacement of an element of the writing system with another glyph or glyphs. The replacement may be a nearly homographic character, a digraph, or a character string. An approximation is different from a typographical error in that an approximation is intentional and aims to preserve the visual appearance of the original. The concept of approximation also applies to the World Wide Web and other forms of textual information available via digital media, though usually at the level of characters, not glyphs.

The German keyboard layout is family of QWERTZ keyboard layouts commonly used in Austria and Germany. It is based on one defined in a former edition of the German standard DIN 2137–2. The current edition DIN 2137-1:2012-06 standardizes it as the first (basic) one of three layouts, calling it "T1".

The Vietnamese language is written with a Latin script with diacritics which requires several accommodations when typing on phone or computers. Software-based systems are a form of writing Vietnamese on phones or computers with software that can be installed on the device or from third-party software such as UniKey. Telex is the oldest input method devised to encode the Vietnamese language with its tones. Other input methods may also include VNI and VIQR. VNI input method is not to be confused with VNI code page.

Caret is the name used familiarly for the character ^ provided on most QWERTY keyboards by typing ⇧ Shift+6. The symbol has a variety of uses in programming and mathematics. The name "caret" arose from its visual similarity to the original proofreader's caret, , a mark used in proofreading to indicate where a punctuation mark, word, or phrase should be inserted into a document. The ASCII standard (X3.64.1977) calls it a "circumflex"; the Unicode standard calls it a "circumflex accent", although it is no longer practicable for that purpose.

References

  1. Kuhn, Markus. "Apostrophe and acute accent confusion". Department of Computer Science and Technology, University of Cambridge. This key is on German typewriters a non-spacing key (DIN 2137). It does not advance the cursor, but causes the next character to appear below the accent
  2. "Character histories: notes on some ASCII code positions".
  3. Kuhn, Markus. "ASCII and Unicode quotation marks". Department of Computer Science and Technology, University of Cambridge. Please do not use the ASCII grave accent as a left quotation mark
  4. "GNU Coding Standards: Quote Characters". GNU Coding Standards. Free Software Foundation. 19 February 2019. Retrieved 12 March 2019. In the C locale, the output of GNU programs should stick to plain ASCII for quotation characters in messages to users: preferably 0x22 (‘"’) or 0x27 (‘'’) for both opening and closing quotes. Although GNU programs traditionally used 0x60 (‘`’) for opening and 0x27 (‘'’) for closing quotes, nowadays quotes ‘`like this'’ are typically rendered asymmetrically, so quoting ‘"like this"’ or ‘'like this'’ typically looks better.
  5. Eggert, Paul (23 January 2012). "makeinfo should quote 'like this' instead of `like this'". bug-texinfo Archives. Retrieved 27 March 2018.
  6. "Command Substitution". wooledge.org. Retrieved 6 August 2024.
  7. "An Introduction to the Z Shell – Command/Process Substitution". zsh.sourceforge.net. Retrieved 27 March 2018.
  8. "Daring Fireball: Markdown Syntax Documentation".
  9. "GitHub Flavored Markdown Spec". Archived from the original on 21 February 2022. Retrieved 23 February 2022.
  10. "Template literals (Template strings)". MDN Web Docs. Retrieved 22 May 2019.
  11. R Core Team, Quotes: Quotes, R Foundation for Statistical Computing.
  12. Odersky, Martin (24 May 2011), The Scala Language Specification Version 2.9
  13. "Skyrim:Console". UESPWiki. Retrieved 15 November 2019.
  14. Cinnamon, Kayla. "Windows Terminal Preview 1.9 Release". devblogs.microsoft.com. Retrieved 5 June 2023.