<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>keyboard &#8211; Joni Mikkola (c) 2023</title>
	<atom:link href="https://jonimikkola.com/tag/keyboard/feed/" rel="self" type="application/rss+xml" />
	<link>https://jonimikkola.com</link>
	<description></description>
	<lastBuildDate>Sat, 28 Feb 2015 14:40:33 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.1.1</generator>
	<item>
		<title>Cocos2d-x 2.x keyboard implementation for Mac OS X</title>
		<link>https://jonimikkola.com/cocos2d-x-2-x-keyboard-implementation-for-mac-os-x/</link>
					<comments>https://jonimikkola.com/cocos2d-x-2-x-keyboard-implementation-for-mac-os-x/#respond</comments>
		
		<dc:creator><![CDATA[jonimikkola]]></dc:creator>
		<pubDate>Sat, 10 May 2014 18:39:59 +0000</pubDate>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[c++]]></category>
		<category><![CDATA[cocos2d-x]]></category>
		<category><![CDATA[github]]></category>
		<category><![CDATA[keyboard]]></category>
		<category><![CDATA[os x]]></category>
		<guid isPermaLink="false">http://www.mikkolajoni.com/?p=39</guid>

					<description><![CDATA[In case someone has problems implementing Mac Cocos2d-x 2.x keyboard like I did, here is link to GitHub with working solution: https://github.com/joni-mikkola/cocos2d-x/tree/keyboard I have provided sample project with the implementation code. I downloaded the original code from somewhere in Cocos2d-x forums and modified it properly to work with Mac OS X. All you have to do, ... <a title="Cocos2d-x 2.x keyboard implementation for Mac OS X" class="read-more" href="https://jonimikkola.com/cocos2d-x-2-x-keyboard-implementation-for-mac-os-x/" aria-label="More on Cocos2d-x 2.x keyboard implementation for Mac OS X">Read more</a>]]></description>
										<content:encoded><![CDATA[<p>In case someone has problems implementing Mac Cocos2d-x 2.x keyboard like I did, here is link to GitHub with working solution: <a title="http://jonimikkola.wordpress.com/2014/04/15/cocos2d-x-2-x-keyboard-implementation-for-mac/" href="https://github.com/joni-mikkola/cocos2d-x/tree/keyboard" target="_blank">https://github.com/joni-mikkola/cocos2d-x/tree/keyboard</a></p>
<p>I have provided sample project with the implementation code. I downloaded the original code from somewhere in Cocos2d-x forums and modified it properly to work with Mac OS X. All you have to do, is to add files from cocos2dx/keyboard_dispatcher to your XCode project, then put following in your CCLayer inheriting class:</p>
<p>[code language=&#8221;cpp&#8221;]<br />
class HelloWorld : public cocos2d::CCLayer, public cocos2d::CCKeyboardDelegate {<br />
&#8230;<br />
virtual void keyDown(int key);<br />
virtual void keyUp(int key);<br />
}</p>
<p>bool HelloWorld::init() {<br />
&#8230;<br />
CCDirector::sharedDirector()-&gt;getKeyboardDispatcher()-&gt;addDelegate(this);<br />
}</p>
<p>void HelloWorld::keyDown(int key) {<br />
CCLog(&quot;%d pressed&quot;, key);<br />
}</p>
<p>void HelloWorld::keyUp(int key) {<br />
CCLog(&quot;%d released&quot;, key);<br />
}<br />
[/code]</p>
<p>If you are having some sort of difficulties with the code, please leave a comment.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://jonimikkola.com/cocos2d-x-2-x-keyboard-implementation-for-mac-os-x/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
