diff options
Diffstat (limited to 'devdocs/elisp/input-modes.html')
| -rw-r--r-- | devdocs/elisp/input-modes.html | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/devdocs/elisp/input-modes.html b/devdocs/elisp/input-modes.html new file mode 100644 index 00000000..9fdd5336 --- /dev/null +++ b/devdocs/elisp/input-modes.html @@ -0,0 +1,14 @@ + <h4 class="subsection">Input Modes</h4> <dl> <dt id="set-input-mode">Function: <strong>set-input-mode</strong> <em>interrupt flow meta &optional quit-char</em> +</dt> <dd> +<p>This function sets the mode for reading keyboard input. If <var>interrupt</var> is non-<code>nil</code>, then Emacs uses input interrupts. If it is <code>nil</code>, then it uses <small>CBREAK</small> mode. The default setting is system-dependent. Some systems always use <small>CBREAK</small> mode regardless of what is specified. </p> <p>When Emacs communicates directly with X, it ignores this argument and uses interrupts if that is the way it knows how to communicate. </p> <p>If <var>flow</var> is non-<code>nil</code>, then Emacs uses <small>XON/XOFF</small> (<kbd>C-q</kbd>, <kbd>C-s</kbd>) flow control for output to the terminal. This has no effect except in <small>CBREAK</small> mode. </p> <p>The argument <var>meta</var> controls support for input character codes above 127. If <var>meta</var> is <code>t</code>, Emacs converts characters with the 8th bit set into Meta characters, before it decodes them as needed (see <a href="terminal-i_002fo-encoding">Terminal I/O Encoding</a>). If <var>meta</var> is <code>nil</code>, Emacs disregards the 8th bit; this is necessary when the terminal uses it as a parity bit. If <var>meta</var> is the symbol <code>encoded</code>, Emacs first decodes the characters using all the 8 bits of each byte, and then converts the decoded single-byte characters into Meta characters if they have their eighth bit set. Finally, if <var>meta</var> is neither <code>t</code> nor <code>nil</code> nor <code>encoded</code>, Emacs uses all 8 bits of input unchanged, both before and after decoding them. This is good for terminals that use 8-bit character sets and don’t encode the Meta modifier as the eighth bit. </p> <p>If <var>quit-char</var> is non-<code>nil</code>, it specifies the character to use for quitting. Normally this character is <kbd>C-g</kbd>. See <a href="quitting">Quitting</a>. </p> +</dd> +</dl> <p>The <code>current-input-mode</code> function returns the input mode settings Emacs is currently using. </p> <dl> <dt id="current-input-mode">Function: <strong>current-input-mode</strong> +</dt> <dd> +<p>This function returns the current mode for reading keyboard input. It returns a list, corresponding to the arguments of <code>set-input-mode</code>, of the form <code>(<var>interrupt</var> <var>flow</var> <var>meta</var> <var>quit</var>)</code> in which: </p> +<dl compact> <dt><var>interrupt</var></dt> <dd><p>is non-<code>nil</code> when Emacs is using interrupt-driven input. If <code>nil</code>, Emacs is using <small>CBREAK</small> mode. </p></dd> <dt><var>flow</var></dt> <dd><p>is non-<code>nil</code> if Emacs uses <small>XON/XOFF</small> (<kbd>C-q</kbd>, <kbd>C-s</kbd>) flow control for output to the terminal. This value is meaningful only when <var>interrupt</var> is <code>nil</code>. </p></dd> <dt><var>meta</var></dt> <dd><p>is <code>t</code> if Emacs treats the eighth bit of input characters as the Meta bit before decoding input; <code>encoded</code> if Emacs treats the eighth bit of the decoded single-byte characters as the Meta bit; <code>nil</code> if Emacs clears the eighth bit of every input character; any other value means Emacs uses all eight bits as the basic character code. </p></dd> <dt><var>quit</var></dt> <dd><p>is the character Emacs currently uses for quitting, usually <kbd>C-g</kbd>. </p></dd> </dl> </dd> +</dl><div class="_attribution"> + <p class="_attribution-p"> + Copyright © 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/Input-Modes.html" class="_attribution-link">https://www.gnu.org/software/emacs/manual/html_node/elisp/Input-Modes.html</a> + </p> +</div> |
