<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://cegui.org.uk/wiki/index.php?action=history&amp;feed=atom&amp;title=User%3ACrond%2Fsandbox%2FopenglSpecialKeyboardExample</id>
		<title>User:Crond/sandbox/openglSpecialKeyboardExample - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://cegui.org.uk/wiki/index.php?action=history&amp;feed=atom&amp;title=User%3ACrond%2Fsandbox%2FopenglSpecialKeyboardExample"/>
		<link rel="alternate" type="text/html" href="http://cegui.org.uk/wiki/index.php?title=User:Crond/sandbox/openglSpecialKeyboardExample&amp;action=history"/>
		<updated>2026-04-10T15:12:56Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.24.1</generator>

	<entry>
		<id>http://cegui.org.uk/wiki/index.php?title=User:Crond/sandbox/openglSpecialKeyboardExample&amp;diff=4545&amp;oldid=prev</id>
		<title>Crond: /* Requirements */ superfluous</title>
		<link rel="alternate" type="text/html" href="http://cegui.org.uk/wiki/index.php?title=User:Crond/sandbox/openglSpecialKeyboardExample&amp;diff=4545&amp;oldid=prev"/>
				<updated>2011-06-20T15:51:19Z</updated>
		
		<summary type="html">&lt;p&gt;‎&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Requirements: &lt;/span&gt; superfluous&lt;/span&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;tr style='vertical-align: top;'&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 15:51, 20 June 2011&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 6:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 6:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Requirements ==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Requirements ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* Python 2.6 &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;(untested on Python 3.+)&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* Python 2.6&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* PyCEGUI&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* PyCEGUI&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* PyOpenGL &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;(GLU and GLUT, as well)&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* PyOpenGL&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Notes ==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Notes ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Crond</name></author>	</entry>

	<entry>
		<id>http://cegui.org.uk/wiki/index.php?title=User:Crond/sandbox/openglSpecialKeyboardExample&amp;diff=4522&amp;oldid=prev</id>
		<title>Crond: /* Source */ pep8</title>
		<link rel="alternate" type="text/html" href="http://cegui.org.uk/wiki/index.php?title=User:Crond/sandbox/openglSpecialKeyboardExample&amp;diff=4522&amp;oldid=prev"/>
				<updated>2011-06-18T20:52:16Z</updated>
		
		<summary type="html">&lt;p&gt;‎&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Source: &lt;/span&gt; pep8&lt;/span&gt;&lt;/p&gt;
&lt;a href=&quot;http://cegui.org.uk/wiki/index.php?title=User:Crond/sandbox/openglSpecialKeyboardExample&amp;amp;diff=4522&amp;amp;oldid=4519&quot;&gt;Show changes&lt;/a&gt;</summary>
		<author><name>Crond</name></author>	</entry>

	<entry>
		<id>http://cegui.org.uk/wiki/index.php?title=User:Crond/sandbox/openglSpecialKeyboardExample&amp;diff=4519&amp;oldid=prev</id>
		<title>Crond: /* GLUT, ASCII, PyCEGUI */</title>
		<link rel="alternate" type="text/html" href="http://cegui.org.uk/wiki/index.php?title=User:Crond/sandbox/openglSpecialKeyboardExample&amp;diff=4519&amp;oldid=prev"/>
				<updated>2011-06-18T20:42:29Z</updated>
		
		<summary type="html">&lt;p&gt;‎&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;GLUT, ASCII, PyCEGUI&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;tr style='vertical-align: top;'&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 20:42, 18 June 2011&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 238:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 238:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=== GLUT, ASCII, PyCEGUI ===&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=== GLUT, ASCII, PyCEGUI ===&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;It can be a little tricky, at times, to separate them all. A good rule of thumb is that using the `ord` function on any input received via GLUT will produce the ASCII value, which can then be handled in whatever way the application desires - e.g. mapping it to a PyCEGUI value.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;It can be a little tricky, at times, to separate them all. A good rule of thumb is that using the `ord` function on any input received via GLUT will produce the ASCII value, which can then be handled in whatever way the application desires - e.g. mapping it to a PyCEGUI value.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;An additional note is that what GLUT considers to be a &amp;quot;special&amp;quot; key is not exactly what PyCEGUI (or any other library, for that matter) considers to be special. For this reason, the `KEYMAP_ASCII` exists and helps define additional keys that are special, whatever that may mean in a particular context.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Crond</name></author>	</entry>

	<entry>
		<id>http://cegui.org.uk/wiki/index.php?title=User:Crond/sandbox/openglSpecialKeyboardExample&amp;diff=4518&amp;oldid=prev</id>
		<title>Crond: /* Introduction */</title>
		<link rel="alternate" type="text/html" href="http://cegui.org.uk/wiki/index.php?title=User:Crond/sandbox/openglSpecialKeyboardExample&amp;diff=4518&amp;oldid=prev"/>
				<updated>2011-06-18T20:39:34Z</updated>
		
		<summary type="html">&lt;p&gt;‎&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Introduction&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;tr style='vertical-align: top;'&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 20:39, 18 June 2011&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 3:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 3:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Introduction ==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Introduction ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This is a simple modification of the basic OpenGL application, as found [[User:Crond/sandbox/&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;openglExample&lt;/del&gt;|here]]. The goal is to present &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;the basics &lt;/del&gt;of keyboard processing, via OpenGL and PyCEGUI.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This is a simple modification of the basic &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;keyboard processing &lt;/ins&gt;OpenGL application, as found [[User:Crond/sandbox/&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;openglKeyboardExample&lt;/ins&gt;|here]]. The goal is to present &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;a further refinement &lt;/ins&gt;of keyboard processing&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;, specifically the handling of &amp;quot;special&amp;quot; keys&lt;/ins&gt;, via OpenGL and PyCEGUI.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Requirements ==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Requirements ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Crond</name></author>	</entry>

	<entry>
		<id>http://cegui.org.uk/wiki/index.php?title=User:Crond/sandbox/openglSpecialKeyboardExample&amp;diff=4517&amp;oldid=prev</id>
		<title>Crond: Created page with &quot;{{VersionBadge|0.7}} {{VersionAtLeast|0.7.5}} &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;  == Introduction == This is a simple modification of the basic OpenGL application, as found [[User:Crond/sa...&quot;</title>
		<link rel="alternate" type="text/html" href="http://cegui.org.uk/wiki/index.php?title=User:Crond/sandbox/openglSpecialKeyboardExample&amp;diff=4517&amp;oldid=prev"/>
				<updated>2011-06-18T20:37:31Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot;{{VersionBadge|0.7}} {{VersionAtLeast|0.7.5}} &amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;  == Introduction == This is a simple modification of the basic OpenGL application, as found [[User:Crond/sa...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{VersionBadge|0.7}} {{VersionAtLeast|0.7.5}}&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
This is a simple modification of the basic OpenGL application, as found [[User:Crond/sandbox/openglExample|here]]. The goal is to present the basics of keyboard processing, via OpenGL and PyCEGUI.&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
* Python 2.6 (untested on Python 3.+)&lt;br /&gt;
* PyCEGUI&lt;br /&gt;
* PyOpenGL (GLU and GLUT, as well)&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
This example assumes you have the CEGUI resources located in the same directory as the script; change `PATH_RESOURCES` if they are elsewhere.&lt;br /&gt;
&lt;br /&gt;
== Source ==&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
#!/usr/bin/env python&lt;br /&gt;
#&lt;br /&gt;
#&lt;br /&gt;
# example.py&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# Import: std&lt;br /&gt;
import sys, os&lt;br /&gt;
&lt;br /&gt;
# Import: PyOpenGL&lt;br /&gt;
from OpenGL.GL import *&lt;br /&gt;
from OpenGL.GLU import *&lt;br /&gt;
from OpenGL.GLUT import *&lt;br /&gt;
&lt;br /&gt;
# Import: PyCEGUI&lt;br /&gt;
import PyCEGUI&lt;br /&gt;
from PyCEGUIOpenGLRenderer import OpenGLRenderer as Renderer&lt;br /&gt;
&lt;br /&gt;
# Constants&lt;br /&gt;
PATH_RESOURCES = './'&lt;br /&gt;
&lt;br /&gt;
# Keymap: ASCII&lt;br /&gt;
KEYMAP_ASCII = {8 : PyCEGUI.Key.Scan.Backspace,&lt;br /&gt;
                13 : PyCEGUI.Key.Scan.Return,&lt;br /&gt;
                27 : PyCEGUI.Key.Scan.Escape,&lt;br /&gt;
                127 : PyCEGUI.Key.Scan.Delete}&lt;br /&gt;
&lt;br /&gt;
# Keymap: GLUT&lt;br /&gt;
KEYMAP_GLUT = {GLUT_KEY_LEFT : PyCEGUI.Key.Scan.ArrowLeft,&lt;br /&gt;
               GLUT_KEY_RIGHT : PyCEGUI.Key.Scan.ArrowRight,&lt;br /&gt;
               GLUT_KEY_HOME : PyCEGUI.Key.Scan.Home,&lt;br /&gt;
               GLUT_KEY_END : PyCEGUI.Key.Scan.End}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# Application&lt;br /&gt;
class Application(object):&lt;br /&gt;
&lt;br /&gt;
  # Constructor&lt;br /&gt;
  def __init__(self):&lt;br /&gt;
    super(Application, self).__init__()&lt;br /&gt;
    self.lastFrameTime = 0&lt;br /&gt;
    self.updateFPS = 0&lt;br /&gt;
    return&lt;br /&gt;
&lt;br /&gt;
  # Initialize: OpenGL&lt;br /&gt;
  # - A full list of values for `glutInitDisplayMode` can be found in the GLUT&lt;br /&gt;
  #   documentation.&lt;br /&gt;
  def initializeOpenGL(self):&lt;br /&gt;
    glutInit()&lt;br /&gt;
    glutInitDisplayMode(GLUT_DEPTH | GLUT_DOUBLE | GLUT_RGBA)&lt;br /&gt;
    glutInitWindowSize(1024, 768)&lt;br /&gt;
    glutInitWindowPosition(-1, -1) # Let the windowing system figure it out&lt;br /&gt;
    glutCreateWindow(&amp;quot;Crazy Eddie's GUI Mk-2 - glut Base Application&amp;quot;)&lt;br /&gt;
    glutSetCursor(GLUT_CURSOR_NONE)&lt;br /&gt;
    return&lt;br /&gt;
&lt;br /&gt;
  # Initialize: Handlers&lt;br /&gt;
  # - Setup the methods which will be called when events happen.&lt;br /&gt;
  def initializeHandlers(self):&lt;br /&gt;
    glutDisplayFunc(self.handlerDisplay)&lt;br /&gt;
    glutReshapeFunc(self.handlerResize)&lt;br /&gt;
    glutKeyboardFunc(self.handlerKeyboard)&lt;br /&gt;
    glutSpecialFunc(self.handlerKeyboardSpecial)&lt;br /&gt;
    glutMouseFunc(self.handlerMouse)&lt;br /&gt;
    glutMotionFunc(self.handlerMouseMotion)&lt;br /&gt;
    glutPassiveMotionFunc(self.handlerMouseMotion)&lt;br /&gt;
    return&lt;br /&gt;
&lt;br /&gt;
  # Initialize: PyCEGUI&lt;br /&gt;
  # - Store some components; saves a lot of typing.&lt;br /&gt;
  def initializePyCEGUI(self):&lt;br /&gt;
    Renderer.bootstrapSystem()&lt;br /&gt;
    self.sys = PyCEGUI.System.getSingleton()&lt;br /&gt;
    self.rp = self.sys.getResourceProvider()&lt;br /&gt;
    self.scheme = PyCEGUI.SchemeManager.getSingleton()&lt;br /&gt;
    self.wm = PyCEGUI.WindowManager.getSingleton()&lt;br /&gt;
    return&lt;br /&gt;
&lt;br /&gt;
  # Initialize: Defaults&lt;br /&gt;
  # - Resource locations.&lt;br /&gt;
  def initializeDefaults(self):&lt;br /&gt;
    self.rp.setResourceGroupDirectory('schemes', os.path.join(PATH_RESOURCES, 'datafiles/schemes'))&lt;br /&gt;
    self.rp.setResourceGroupDirectory('imagesets', os.path.join(PATH_RESOURCES, 'datafiles/imagesets'))&lt;br /&gt;
    self.rp.setResourceGroupDirectory('fonts', os.path.join(PATH_RESOURCES, 'datafiles/fonts'))&lt;br /&gt;
    self.rp.setResourceGroupDirectory('layouts', os.path.join(PATH_RESOURCES, 'datafiles/layouts'))&lt;br /&gt;
    self.rp.setResourceGroupDirectory('looknfeels', os.path.join(PATH_RESOURCES, 'datafiles/looknfeel'))&lt;br /&gt;
    self.rp.setResourceGroupDirectory('schemas', os.path.join(PATH_RESOURCES, 'datafiles/xml_schemas'))&lt;br /&gt;
    PyCEGUI.Imageset.setDefaultResourceGroup('imagesets')&lt;br /&gt;
    PyCEGUI.Font.setDefaultResourceGroup('fonts')&lt;br /&gt;
    PyCEGUI.Scheme.setDefaultResourceGroup('schemes')&lt;br /&gt;
    PyCEGUI.WidgetLookManager.setDefaultResourceGroup('looknfeels')&lt;br /&gt;
    PyCEGUI.WindowManager.setDefaultResourceGroup('layouts')&lt;br /&gt;
    parser = self.sys.getXMLParser()&lt;br /&gt;
    if parser.isPropertyPresent('SchemaDefaultResourceGroup'):&lt;br /&gt;
      parser.setProperty('SchemaDefaultResourceGroup', 'schemas')&lt;br /&gt;
    return&lt;br /&gt;
&lt;br /&gt;
  # Initialize: GUI&lt;br /&gt;
  # - This is where we are actually setting up the windows we will see.&lt;br /&gt;
  def initializeGUI(self):&lt;br /&gt;
    self.scheme.create('VanillaSkin.scheme')&lt;br /&gt;
    self.scheme.create('TaharezLook.scheme')&lt;br /&gt;
&lt;br /&gt;
    # GUISheet&lt;br /&gt;
    self.rootWindow = self.wm.loadWindowLayout('VanillaWindows.layout')&lt;br /&gt;
    self.sys.setGUISheet(self.rootWindow)&lt;br /&gt;
&lt;br /&gt;
    # Cursor&lt;br /&gt;
    self.sys.setDefaultMouseCursor('Vanilla-Images', 'MouseArrow')&lt;br /&gt;
&lt;br /&gt;
    # An extra window&lt;br /&gt;
    w = self.wm.createWindow('TaharezLook/FrameWindow', 'Demo window')&lt;br /&gt;
    self.rootWindow.addChildWindow(w)&lt;br /&gt;
    return&lt;br /&gt;
&lt;br /&gt;
  # Initialize&lt;br /&gt;
  def Initialize(self):&lt;br /&gt;
    self.initializeOpenGL()&lt;br /&gt;
    self.initializeHandlers()&lt;br /&gt;
    self.initializePyCEGUI()&lt;br /&gt;
    self.initializeDefaults()&lt;br /&gt;
    self.initializeGUI()&lt;br /&gt;
    return&lt;br /&gt;
&lt;br /&gt;
  # Handler: Display&lt;br /&gt;
  def handlerDisplay(self):&lt;br /&gt;
&lt;br /&gt;
    # Injecting the time allows CEGUI to know how much time has passed, and&lt;br /&gt;
    # use that to coordinate certain activities - fading, animation, tooltips,&lt;br /&gt;
    # etc.&lt;br /&gt;
    now = glutGet(GLUT_ELAPSED_TIME)&lt;br /&gt;
    elapsed = (now - self.lastFrameTime) / 1000.0&lt;br /&gt;
    self.lastFrameTime = now&lt;br /&gt;
    self.updateFPS = self.updateFPS - elapsed&lt;br /&gt;
    self.sys.injectTimePulse(elapsed)&lt;br /&gt;
&lt;br /&gt;
    # Actual rendering&lt;br /&gt;
    # - `renderGUI` updates CEGUI's picture of the GUI.&lt;br /&gt;
    # - `glutPostRedisplay` is what actually marks the window as needing to&lt;br /&gt;
    #   be redrawn by OpenGL.&lt;br /&gt;
    glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT)&lt;br /&gt;
    self.sys.renderGUI()&lt;br /&gt;
    glutPostRedisplay()&lt;br /&gt;
    glutSwapBuffers()&lt;br /&gt;
    return&lt;br /&gt;
&lt;br /&gt;
  # Handler: Resize&lt;br /&gt;
  # - `glViewport` modifies the OpenGL viewport to whatever the window size is.&lt;br /&gt;
  def handlerResize(self, width, height):&lt;br /&gt;
    glViewport(0, 0, width, height)&lt;br /&gt;
    self.sys.notifyDisplaySizeChanged(PyCEGUI.Size(width, height))&lt;br /&gt;
    return&lt;br /&gt;
&lt;br /&gt;
  # Handler: Assist keyboard&lt;br /&gt;
  def handlerAssistKeyboard(self, key):&lt;br /&gt;
    try:&lt;br /&gt;
      self.sys.injectKeyDown(KEYMAP_ASCII[key])&lt;br /&gt;
    except KeyError:&lt;br /&gt;
      return False&lt;br /&gt;
  return True&lt;br /&gt;
&lt;br /&gt;
  # Handler: Keyboard&lt;br /&gt;
  def handlerKeyboard(self, key, x, y):&lt;br /&gt;
    k = ord(key)&lt;br /&gt;
    if not self.handlerAssistKeyboard(k):&lt;br /&gt;
      self.sys.injectChar(ord(key))&lt;br /&gt;
  return&lt;br /&gt;
&lt;br /&gt;
  # Handler: Keyboard special&lt;br /&gt;
  def handlerKeyboardSpecial(self, key, x, y):&lt;br /&gt;
    try:&lt;br /&gt;
      self.sys.injectKeyDown(KEYMAP_GLUT[key])&lt;br /&gt;
    except KeyError:&lt;br /&gt;
      # Ignore it.&lt;br /&gt;
      pass&lt;br /&gt;
  return&lt;br /&gt;
&lt;br /&gt;
  # Handler: Mouse buttons&lt;br /&gt;
  def handlerMouse(self, button, state, x, y):&lt;br /&gt;
    if button == GLUT_LEFT_BUTTON:&lt;br /&gt;
      if state == GLUT_UP:&lt;br /&gt;
        self.sys.injectMouseButtonUp(PyCEGUI.LeftButton)&lt;br /&gt;
      else:&lt;br /&gt;
        self.sys.injectMouseButtonDown(PyCEGUI.LeftButton)&lt;br /&gt;
    elif button == GLUT_RIGHT_BUTTON:&lt;br /&gt;
      if state == GLUT_UP:&lt;br /&gt;
        self.sys.injectMouseButtonUp(PyCEGUI.RightButton)&lt;br /&gt;
      else:&lt;br /&gt;
        self.sys.injectMouseButtonDown(PyCEGUI.RightButton)&lt;br /&gt;
    return&lt;br /&gt;
&lt;br /&gt;
  # Handler: Mouse motion&lt;br /&gt;
  def handlerMouseMotion(self, x, y):&lt;br /&gt;
    self.sys.injectMousePosition(x, y)&lt;br /&gt;
    return&lt;br /&gt;
&lt;br /&gt;
  # Run&lt;br /&gt;
  def Run(self):&lt;br /&gt;
    self.lastFrameTime = glutGet(GLUT_ELAPSED_TIME)&lt;br /&gt;
    glutMainLoop()&lt;br /&gt;
    return&lt;br /&gt;
&lt;br /&gt;
# Main&lt;br /&gt;
def main():&lt;br /&gt;
  app = Application()&lt;br /&gt;
  app.Initialize()&lt;br /&gt;
  app.Run()&lt;br /&gt;
  return 0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# Guard&lt;br /&gt;
if __name__ == '__main__':&lt;br /&gt;
  sys.exit(main())&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Demonstration ==&lt;br /&gt;
As before, we can see that this works by running the application, typing into the Editbox, and pressing the arrow keys, or any of the other keys.&lt;br /&gt;
&lt;br /&gt;
Several keys, such as Escape and Return, are not readily testable (i.e. produce no discernible effects on the application), although they do work. It is left as an exercise to the reader to prove it.&lt;br /&gt;
&lt;br /&gt;
== Examination ==&lt;br /&gt;
=== GLUT, ASCII, PyCEGUI ===&lt;br /&gt;
It can be a little tricky, at times, to separate them all. A good rule of thumb is that using the `ord` function on any input received via GLUT will produce the ASCII value, which can then be handled in whatever way the application desires - e.g. mapping it to a PyCEGUI value.&lt;/div&gt;</summary>
		<author><name>Crond</name></author>	</entry>

	</feed>