summaryrefslogtreecommitdiff
path: root/devdocs/elisp/other-char-bits.html
blob: 01ec44926d543b76b847da32863e3c2daf7e44d6 (plain)
1
2
3
4
5
6
 <h4 class="subsubsection">Other Character Modifier Bits</h4> <p>The case of a graphic character is indicated by its character code; for example, <acronym>ASCII</acronym> distinguishes between the characters ‘<samp>a</samp>’ and ‘<samp>A</samp>’. But <acronym>ASCII</acronym> has no way to represent whether a control character is upper case or lower case. Emacs uses the 2**25 bit to indicate that the shift key was used in typing a control character. This distinction is possible only on a graphical display such as a GUI display on X; text terminals do not report the distinction. The Lisp syntax for the shift bit is ‘<samp>\S-</samp>’; thus, ‘<samp>?\C-\S-o</samp>’ or ‘<samp>?\C-\S-O</samp>’ represents the shifted-control-o character. </p>    <p>The X Window System defines three other modifier bits that can be set in a character: <em>hyper</em>, <em>super</em> and <em>alt</em>. The syntaxes for these bits are ‘<samp>\H-</samp>’, ‘<samp>\s-</samp>’ and ‘<samp>\A-</samp>’. (Case is significant in these prefixes.) Thus, ‘<samp>?\H-\M-\A-x</samp>’ represents <kbd>Alt-Hyper-Meta-x</kbd>. (Note that ‘<samp>\s</samp>’ with no following ‘<samp>-</samp>’ represents the space character.) Numerically, the bit values are 2**22 for alt, 2**23 for super and 2**24 for hyper. </p><div class="_attribution">
  <p class="_attribution-p">
    Copyright &copy; 1990-1996, 1998-2022 Free Software Foundation, Inc. <br>Licensed under the GNU GPL license.<br>
    <a href="https://www.gnu.org/software/emacs/manual/html_node/elisp/Other-Char-Bits.html" class="_attribution-link">https://www.gnu.org/software/emacs/manual/html_node/elisp/Other-Char-Bits.html</a>
  </p>
</div>