28 lines
8.1 KiB
HTML
28 lines
8.1 KiB
HTML
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>The Be Book - Special Topics - The Keyboard</title><link rel="stylesheet" href="be_book.css" type="text/css" media="all" /><link rel="shortcut icon" type="image/vnd.microsoft.icon" href="./images/favicon.ico" /><!--[if IE]>
|
||
<link rel="stylesheet" type="text/css" href="be_book_ie.css" />
|
||
<![endif]--><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="Access, BeOS, BeBook, API" /><link rel="start" href="index.html" title="The Be Book" /><link rel="up" href="TheKeyboard.html" title="The Keyboard" /><link rel="prev" href="TheKeyboard_JourneyOfAKeystroke.html" title="Journey Of A Keystroke" /><link rel="next" href="TheKeyboard_KeyCodes.html" title="Key Codes" /></head><body><div id="header"><div id="headerT"><div id="headerTL"><a accesskey="p" href="TheKeyboard_JourneyOfAKeystroke.html" title="Journey Of A Keystroke"><img src="./images/navigation/prev.png" alt="Prev" /></a> <a accesskey="u" href="TheKeyboard.html" title="The Keyboard"><img src="./images/navigation/up.png" alt="Up" /></a> <a accesskey="n" href="TheKeyboard_KeyCodes.html" title="Key Codes"><img src="./images/navigation/next.png" alt="Next" /></a></div><div id="headerTR"><div id="navigpeople"><a href="http://www.haiku-os.org"><img src="./images/People_24.png" alt="haiku-os.org" title="Visit The Haiku Website" /></a></div><div class="navighome" title="Home"><a accesskey="h" href="index.html"><img src="./images/navigation/home.png" alt="Home" /></a></div><div class="navigboxed" id="navigindex"><a accesskey="i" href="ClassIndex.html" title="Index">I</a></div><div class="navigboxed" id="naviglang" title="English">en</div></div><div id="headerTC">The Be Book - Special Topics - The Keyboard</div></div><div id="headerB">Prev: <a href="TheKeyboard_JourneyOfAKeystroke.html">Journey Of A Keystroke</a> Up: <a href="TheKeyboard.html">The Keyboard</a> Next: <a href="TheKeyboard_KeyCodes.html">Key Codes</a></div><hr /></div><div class="section"><div xmlns="" xmlns:d="http://docbook.org/ns/docbook" class="titlepage"><div><div xmlns:d="http://docbook.org/ns/docbook"><h2 xmlns="http://www.w3.org/1999/xhtml" class="title"><a id="TheKeyboard_KeyboardMessages"></a>Keyboard Messages</h2></div></div></div><div class="section"><div xmlns="" xmlns:d="http://docbook.org/ns/docbook" class="titlepage"><div><hr /><div xmlns:d="http://docbook.org/ns/docbook"><h3 xmlns="http://www.w3.org/1999/xhtml" class="title"><a id="id639207"></a>B_KEY_DOWN, B_KEY_UP, B_UNMAPPED_KEY_DOWN, B_UNMAPPED_KEY_UP</h3></div></div></div><div class="informaltable"><table border="0"><colgroup><col /><col /></colgroup><tbody><tr><td>Source:</td><td>The system.</td></tr><tr><td>Target:</td><td>The focus view's
|
||
<a class="link" href="BWindow.html" title="BWindow"><code class="classname">BWindow</code></a>.</td></tr><tr><td>Hook:</td><td><a class="link" href="BView.html#BView_KeyDown" title="KeyDown()"><code class="methodname">BView::KeyDown()</code></a>
|
||
(<code class="constant">B_KEY_DOWN</code>)<br />
|
||
<a class="link" href="BView.html#BView_KeyUp" title="KeyUp()"><code class="methodname">BView::KeyUp()</code></a>
|
||
(<code class="constant">B_KEY_UP</code>)<br />
|
||
(The <code class="constant">…UNMAPPED…</code> messages don't map to hook functions.)</td></tr></tbody></table></div><p><code class="constant">B_KEY_DOWN</code> is sent when the user presses (or holds down) a key that's
|
||
mapped to a character; <code class="constant">B_KEY_UP</code> is sent when the user releases the key.
|
||
<code class="constant">B_UNMAPPED_KEY_DOWN</code> and <code class="constant">B_UNMAPPED_KEY_UP</code> are sent if the key isn't
|
||
mapped to a character. This doesn't include modifier keys, which are
|
||
reported in the <code class="constant">B_MODIFIERS_CHANGED</code> message.</p><div class="informaltable"><table border="1"><colgroup><col /><col /><col /></colgroup><thead><tr><th>Field</th><th>Type code</th><th>Description</th></tr></thead><tbody><tr><td><code class="varname">when</code></td><td><code class="constant">B_INT64_TYPE</code></td><td>Event time, in microseconds since 01/01/70</td></tr><tr><td><code class="varname">key</code></td><td><code class="constant">B_INT32_TYPE</code></td><td>The code for the physical key that was pressed. See
|
||
"<a class="xref" href="TheKeyboard_MoreOnKeyboardMapping.html" title="More On Keyboard Mapping">More On Keyboard Mapping</a>"
|
||
for a discussion of the keymap.</td></tr><tr><td><code class="varname">be:key_repeat</code></td><td><code class="constant">B_INT32_TYPE</code></td><td>The "iteration number" of this key down.
|
||
When the user holds the key down, successive messages are sent with
|
||
increasing key repeat values. This field isn't present in the initial
|
||
event; the first repeat message (i.e., the second key down message) has a
|
||
key repeat value of 1. (<code class="constant">B_KEY_DOWN</code> only)</td></tr><tr><td><code class="varname">modifiers</code></td><td><code class="constant">B_INT32_TYPE</code></td><td>The modifier keys that were in effect at the
|
||
time of the event. See
|
||
"<a class="xref" href="TheKeyboard_ModifierKeys.html" title="Modifier Keys">Modifier Keys</a>"
|
||
for a list of values.</td></tr><tr><td><code class="varname">states</code></td><td><code class="constant">B_UINT8_TYPE</code></td><td>The state of all keys at the time of the event. See
|
||
"<a class="xref" href="TheKeyboard_KeyStates.html" title="Key States">Key States</a>."</td></tr><tr><td><code class="varname">byte</code>[3]</td><td><code class="constant">B_INT8_TYPE</code></td><td>The UTF-8 data that's generated. (<code class="constant">B_KEY_DOWN</code> and <code class="constant">B_KEY_UP</code> only)</td></tr><tr><td><code class="varname">bytes</code></td><td><code class="constant">B_STRING_TYPE</code></td><td>The string that's generated.
|
||
(The string usually contains a single character.) (<code class="constant">B_KEY_DOWN</code> and <code class="constant">B_KEY_UP</code> only)</td></tr><tr><td><code class="varname">raw_char</code></td><td><code class="constant">B_INT32_TYPE</code></td><td>Modifier-independent ASCII code for the character. (<code class="constant">B_KEY_DOWN</code> and <code class="constant">B_KEY_UP</code> only)</td></tr></tbody></table></div></div></div><div id="footer"><hr /><div id="footerT">Prev: <a href="TheKeyboard_JourneyOfAKeystroke.html">Journey Of A Keystroke</a> Up: <a href="TheKeyboard.html">The Keyboard</a> Next: <a href="TheKeyboard_KeyCodes.html">Key Codes</a> </div><div id="footerB"><div id="footerBL"><a href="TheKeyboard_JourneyOfAKeystroke.html" title="Journey Of A Keystroke"><img src="./images/navigation/prev.png" alt="Prev" /></a> <a href="TheKeyboard.html" title="The Keyboard"><img src="./images/navigation/up.png" alt="Up" /></a> <a href="TheKeyboard_KeyCodes.html" title="Key Codes"><img src="./images/navigation/next.png" alt="Next" /></a></div><div id="footerBR"><div><a href="http://www.haiku-os.org"><img src="./images/People_24.png" alt="haiku-os.org" title="Visit The Haiku Website" /></a></div><div class="navighome" title="Home"><a accesskey="h" href="index.html"><img src="./images/navigation/home.png" alt="Home" /></a></div></div><div id="footerBC"><a href="http://www.access-company.com/home.html" title="ACCESS Co."><img alt="Access Company" src="./images/access_logo.png" /></a></div></div></div><div id="licenseFooter"><div id="licenseFooterBL"><a rel="license" href="http://creativecommons.org/licenses/by-nc-nd/3.0/" title="Creative Commons License"><img alt="Creative Commons License" style="border-width:0" src="https://licensebuttons.net/l/by-nc-nd/3.0/88x31.png" /></a></div><div id="licenseFooterBR"><a href="./LegalNotice.html">Legal Notice</a></div><div id="licenseFooterBC"><span id="licenseText">This work is licensed under a
|
||
<a rel="license" href="http://creativecommons.org/licenses/by-nc-nd/3.0/">Creative
|
||
Commons Attribution-Non commercial-No Derivative Works 3.0 License</a>.</span></div></div></body></html>
|