<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> <title>Crystal Space 1.2.1: iKeyboardDriver Struct Reference (Crystal Space 1.2.1 Public API Reference)</title> <link href="tabs.css" rel="stylesheet" type="text/css"> <link href="doxygen.css" rel="stylesheet" type="text/css"> </head><body> <table border="0" cellpadding="0" cellspacing="0" width="100%" class="head"> <tr height="59"> <td class="head" width="202" valign="bottom" style="padding-left:0;"><a href="http://www.crystalspace3d.org/"><img src="csblur.png" width="236" height="59" alt="CrystalSpace" border="0"></a></td> <td class="head"><h2>Public API Reference</h2></td> </tr> <tr height="11"> <td colspan="2" class="headshadow" valign="top" style="padding-left:0;"><img src="csblurb.png" width="236" height="11" alt="" border="0"></td> </tr> </table> <div class="content"> <!-- Generated by Doxygen 1.5.3 --> <div class="tabs"> <ul> <li><a href="index.html"><span>Main Page</span></a></li> <li><a href="modules.html"><span>Modules</span></a></li> <li><a href="namespaces.html"><span>Namespaces</span></a></li> <li class="current"><a href="classes.html"><span>Classes</span></a></li> <li><a href="files.html"><span>Files</span></a></li> <li><a href="pages.html"><span>Related Pages</span></a></li> </ul> </div> <div class="tabs"> <ul> <li><a href="classes.html"><span>Alphabetical List</span></a></li> <li><a href="annotated.html"><span>Class List</span></a></li> <li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li> <li><a href="functions.html"><span>Class Members</span></a></li> </ul> </div> <h1>iKeyboardDriver Struct Reference<br> <small> [<a class="el" href="group__event__handling.html">Event handling</a>]</small> </h1><!-- doxytag: class="iKeyboardDriver" --><!-- doxytag: inherits="iBase" -->Generic Keyboard Driver. <a href="#_details">More...</a> <p> <code>#include <<a class="el" href="iutil_2csinput_8h-source.html">iutil/csinput.h</a>></code> <p> <div class="dynheader"> Inheritance diagram for iKeyboardDriver:</div> <div class="dynsection"> <p><center><img src="structiKeyboardDriver__inherit__graph.png" border="0" usemap="#iKeyboardDriver__inherit__map" alt="Inheritance graph"></center> <map name="iKeyboardDriver__inherit__map"> <area shape="rect" href="classscfImplementation2.html" title="scfImplementation2\< csKeyboardDriver, iKeyboardDriver, iEventHandler \>" alt="" coords="5,161,515,188"><area shape="rect" href="structiBase.html" title="This is the basic interface: all other interfaces should be derived from this one..." alt="" coords="232,7,288,33"><area shape="rect" href="classcsKeyboardDriver.html" title="Generic Keyboard Driver." alt="" coords="192,239,328,265"></map> <center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center></div> <p> <a href="structiKeyboardDriver-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0"> <tr><td></td></tr> <tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="classcsPtr.html">csPtr</a><br> < <a class="el" href="structiKeyComposer.html">iKeyComposer</a> > </td><td class="memItemRight" valign="bottom"><a class="el" href="structiKeyboardDriver.html#cfe7d1d4c2561a96062c2cf50da191f0">CreateKeyComposer</a> ()=0</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Return an instance of the keyboard composer. <a href="#cfe7d1d4c2561a96062c2cf50da191f0"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="structiKeyboardDriver.html#3cb6228eb1bcc9818fcb8ee56b4bb2fa">DoKey</a> (<a class="el" href="group__util.html#g47e911f87ff568b2779f26cf226f5070">utf32_char</a> codeRaw, <a class="el" href="group__util.html#g47e911f87ff568b2779f26cf226f5070">utf32_char</a> codeCooked, bool iDown, bool autoRepeat=false, <a class="el" href="evdefs_8h.html#01c809d9f3c8b5c7985bc34b611ecdd4">csKeyCharType</a> charType=csKeyCharTypeNormal)=0</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Call this routine to add a key down/up event to queue. <a href="#3cb6228eb1bcc9818fcb8ee56b4bb2fa"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><a class="el" href="structiKeyboardDriver.html#bd37e138c68f54dde886727dc5765dd6">GetKeyState</a> (<a class="el" href="group__util.html#g47e911f87ff568b2779f26cf226f5070">utf32_char</a> codeRaw) const =0</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Query the state of a key. <a href="#bd37e138c68f54dde886727dc5765dd6"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="group__util.html#g1134b580f8da4de94ca6b1de4d37975e">uint32</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="structiKeyboardDriver.html#82678ca934668e1ac492c32883b87411">GetModifierState</a> (<a class="el" href="group__util.html#g47e911f87ff568b2779f26cf226f5070">utf32_char</a> codeRaw) const =0</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Get the current state of the modifiers. <a href="#82678ca934668e1ac492c32883b87411"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="structiKeyboardDriver.html#a24cb7558916f892d8dfa2919a70ed7d">Reset</a> ()=0</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Call to release all key down flags (when focus switches from application window, for example). <a href="#a24cb7558916f892d8dfa2919a70ed7d"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="group__event__handling.html#ge069ae995b63f57fb1732075224dcfee">csEventError</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="structiKeyboardDriver.html#5837d4e5170500cd86524f196d6baeec">SynthesizeCooked</a> (<a class="el" href="structiEvent.html">iEvent</a> *)=0</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">For an event that contains only a raw code, this adds cooked code and modifiers. <a href="#5837d4e5170500cd86524f196d6baeec"></a><br></td></tr> </table> <hr><a name="_details"></a><h2>Detailed Description</h2> Generic Keyboard Driver. <p> Keyboard driver listens for keyboard-related events from the event queue, stores state about the keyboard, and possibly synthesizes additional events, such as when a character is "composed". Typically, one instance of this object is available from the shared-object registry (<a class="el" href="structiObjectRegistry.html" title="This interface serves as a registry of other objects.">iObjectRegistry</a>) under the name "crystalspace.driver.input.generic.keyboard".<p> Main creators of instances implementing this interface:<ul> <li><a class="el" href="classcsInitializer.html#61494a85e1807c790070d36f5a055f10" title="Create everything needed to get a CS application operational.">csInitializer::CreateEnvironment()</a></li><li><a class="el" href="classcsInitializer.html#3c3ab90760545b22e27b3d04d0c229dd" title="This function will create the three common input drivers (csKeyboardDriver, csMouseDriver...">csInitializer::CreateInputDrivers()</a></li></ul> <p> Main ways to get pointers to this interface:<ul> <li><a class="el" href="iutil_2objreg_8h.html#2a09063f1dabdde133a6269016f6a3da">CS_QUERY_REGISTRY()</a></li></ul> <p> <dl compact><dt><b><a class="el" href="todo.html#_todo000028">Todo:</a></b></dt><dd>Need a simple way to query all currently-set modifiers for event construction. </dd></dl> <dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classcsMouseDriver.html#66f5a281c11579f362d6d88a8101dc87" title="Call this to add a 'mouse button down/up' event to queue.">csMouseDriver::DoButton()</a> <p> <a class="el" href="classcsMouseDriver.html#24682475cbefe8b9c0374362a6a4a52a" title="Call this to add a 'mouse moved' event to queue.">csMouseDriver::DoMotion()</a> <p> <a class="el" href="classcsJoystickDriver.html#24a9a5192a095aac4d40c90cec9a84e5" title="Call this to add a 'joystick button down/up' event to queue.">csJoystickDriver::DoButton()</a> <p> <a class="el" href="classcsJoystickDriver.html#4aa22e64513af06818bfe9a5cdea9815" title="Call this to add a 'joystick moved' event to queue.">csJoystickDriver::DoMotion()</a> </dd></dl> <p>Definition at line <a class="el" href="iutil_2csinput_8h-source.html#l00112">112</a> of file <a class="el" href="iutil_2csinput_8h-source.html">csinput.h</a>.</p> <hr><h2>Member Function Documentation</h2> <a class="anchor" name="cfe7d1d4c2561a96062c2cf50da191f0"></a><!-- doxytag: member="iKeyboardDriver::CreateKeyComposer" ref="cfe7d1d4c2561a96062c2cf50da191f0" args="()=0" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">virtual <a class="el" href="classcsPtr.html">csPtr</a><<a class="el" href="structiKeyComposer.html">iKeyComposer</a>> iKeyboardDriver::CreateKeyComposer </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td width="100%"><code> [pure virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Return an instance of the keyboard composer. <p> <dl class="remark" compact><dt><b>Remarks:</b></dt><dd>All composers are independent. Specifically, passing a dead key to one composer won't affect the result after the next keyboard event of any other composer. </dd></dl> <p>Implemented in <a class="el" href="classcsKeyboardDriver.html#015a278792cd4497285b07092040dfd4">csKeyboardDriver</a>.</p> </div> </div><p> <a class="anchor" name="3cb6228eb1bcc9818fcb8ee56b4bb2fa"></a><!-- doxytag: member="iKeyboardDriver::DoKey" ref="3cb6228eb1bcc9818fcb8ee56b4bb2fa" args="(utf32_char codeRaw, utf32_char codeCooked, bool iDown, bool autoRepeat=false, csKeyCharType charType=csKeyCharTypeNormal)=0" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">virtual void iKeyboardDriver::DoKey </td> <td>(</td> <td class="paramtype"><a class="el" href="group__util.html#g47e911f87ff568b2779f26cf226f5070">utf32_char</a> </td> <td class="paramname"> <em>codeRaw</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="group__util.html#g47e911f87ff568b2779f26cf226f5070">utf32_char</a> </td> <td class="paramname"> <em>codeCooked</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">bool </td> <td class="paramname"> <em>iDown</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">bool </td> <td class="paramname"> <em>autoRepeat</em> = <code>false</code>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="evdefs_8h.html#01c809d9f3c8b5c7985bc34b611ecdd4">csKeyCharType</a> </td> <td class="paramname"> <em>charType</em> = <code>csKeyCharTypeNormal</code></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td width="100%"><code> [pure virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Call this routine to add a key down/up event to queue. <p> <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>codeRaw</em> </td><td>'Raw' code of the pressed key. </td></tr> <tr><td valign="top"></td><td valign="top"><em>codeCooked</em> </td><td>'Cooked' code of the pressed key. </td></tr> <tr><td valign="top"></td><td valign="top"><em>iDown</em> </td><td>Whether the key is up or down. </td></tr> <tr><td valign="top"></td><td valign="top"><em>autoRepeat</em> </td><td>Auto-repeat flag for the key event. Typically only used by the platform-specific keyboard agents. </td></tr> <tr><td valign="top"></td><td valign="top"><em>charType</em> </td><td>When the cooked code is a character, it determines whether it is a normal, or dead character. </td></tr> </table> </dl> <p>Implemented in <a class="el" href="classcsKeyboardDriver.html#27e68cb01657dd34d3a7e67f389c758d">csKeyboardDriver</a>.</p> </div> </div><p> <a class="anchor" name="bd37e138c68f54dde886727dc5765dd6"></a><!-- doxytag: member="iKeyboardDriver::GetKeyState" ref="bd37e138c68f54dde886727dc5765dd6" args="(utf32_char codeRaw) const =0" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">virtual bool iKeyboardDriver::GetKeyState </td> <td>(</td> <td class="paramtype"><a class="el" href="group__util.html#g47e911f87ff568b2779f26cf226f5070">utf32_char</a> </td> <td class="paramname"> <em>codeRaw</em> </td> <td> ) </td> <td width="100%"> const<code> [pure virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Query the state of a key. <p> All key codes are supported. Returns true if the key is pressed, false if not. <p>Implemented in <a class="el" href="classcsKeyboardDriver.html#caae2174c81e85bbf9583f2ce2b287e4">csKeyboardDriver</a>.</p> </div> </div><p> <a class="anchor" name="82678ca934668e1ac492c32883b87411"></a><!-- doxytag: member="iKeyboardDriver::GetModifierState" ref="82678ca934668e1ac492c32883b87411" args="(utf32_char codeRaw) const =0" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">virtual <a class="el" href="group__util.html#g1134b580f8da4de94ca6b1de4d37975e">uint32</a> iKeyboardDriver::GetModifierState </td> <td>(</td> <td class="paramtype"><a class="el" href="group__util.html#g47e911f87ff568b2779f26cf226f5070">utf32_char</a> </td> <td class="paramname"> <em>codeRaw</em> </td> <td> ) </td> <td width="100%"> const<code> [pure virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Get the current state of the modifiers. <p> <p>Implemented in <a class="el" href="classcsKeyboardDriver.html#f16bcd780fcebecc6fda8ff2d8df5712">csKeyboardDriver</a>.</p> </div> </div><p> <a class="anchor" name="a24cb7558916f892d8dfa2919a70ed7d"></a><!-- doxytag: member="iKeyboardDriver::Reset" ref="a24cb7558916f892d8dfa2919a70ed7d" args="()=0" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">virtual void iKeyboardDriver::Reset </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td width="100%"><code> [pure virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Call to release all key down flags (when focus switches from application window, for example). <p> <p>Implemented in <a class="el" href="classcsKeyboardDriver.html#fe516427533b6355e2d4eb95df96dbf3">csKeyboardDriver</a>.</p> </div> </div><p> <a class="anchor" name="5837d4e5170500cd86524f196d6baeec"></a><!-- doxytag: member="iKeyboardDriver::SynthesizeCooked" ref="5837d4e5170500cd86524f196d6baeec" args="(iEvent *)=0" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">virtual <a class="el" href="group__event__handling.html#ge069ae995b63f57fb1732075224dcfee">csEventError</a> iKeyboardDriver::SynthesizeCooked </td> <td>(</td> <td class="paramtype"><a class="el" href="structiEvent.html">iEvent</a> * </td> <td class="paramname"> </td> <td> ) </td> <td width="100%"><code> [pure virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p> For an event that contains only a raw code, this adds cooked code and modifiers. <p> <p>Implemented in <a class="el" href="classcsKeyboardDriver.html#4c898923aaf445ab61082f45044c3055">csKeyboardDriver</a>.</p> </div> </div><p> <hr>The documentation for this struct was generated from the following file:<ul> <li>iutil/<a class="el" href="iutil_2csinput_8h-source.html">csinput.h</a></ul> <hr size="1"><address><small>Generated for Crystal Space 1.2.1 by <a href="http://www.doxygen.org/index.html">doxygen</a> 1.5.3 </small></address> </div></body> </html>