<?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>selfcontained &#187; Uncategorized</title>
	<atom:link href="http://www.selfcontained.us/category/uncategorized/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.selfcontained.us</link>
	<description>web-development</description>
	<lastBuildDate>Sat, 08 May 2010 19:49:39 +0000</lastBuildDate>
	
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>First iPhone App &#8211; LDS Gems</title>
		<link>http://www.selfcontained.us/2010/05/08/first-iphone-app-lds-gems/</link>
		<comments>http://www.selfcontained.us/2010/05/08/first-iphone-app-lds-gems/#comments</comments>
		<pubDate>Sat, 08 May 2010 19:49:08 +0000</pubDate>
		<dc:creator>brad</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[Titanium]]></category>

		<guid isPermaLink="false">http://www.selfcontained.us/?p=201</guid>
		<description><![CDATA[After a bit of work, I finally got my first iPhone app on the App store.  It&#8217;s nothing extraordinary, but was a learning experience for the most part.  It&#8217;s called LDS Gems, and is an easier way to manage, read, and share the quotes and stories provided by the LDS church at http://gems.lds.org.
I [...]]]></description>
			<content:encoded><![CDATA[<p>After a bit of work, I finally got my first iPhone app on the App store.  It&#8217;s nothing extraordinary, but was a learning experience for the most part.  It&#8217;s called <a href="http://itunes.apple.com/us/app/lds-gems/id369807515">LDS Gems</a>, and is an easier way to manage, read, and share the quotes and stories provided by the LDS church at <a href="http://gems.lds.org">http://gems.lds.org</a>.</p>
<p>I used <a href="http://www.appcelerator.com/">Titanium Appcelerator</a> to build it, and was really impressed with how much easier it was to develop using Javascript as opposed to Objective-C.  This is probably due to having quite a bit more experience with Javascript than the later, but I really enjoyed it and would recommend it to anyone wanting to dive into iPhone App development, but not ready to take on learning Objective-C.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.selfcontained.us/2010/05/08/first-iphone-app-lds-gems/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Getting keycode values in Javascript</title>
		<link>http://www.selfcontained.us/2009/09/16/getting-keycode-values-in-javascript/</link>
		<comments>http://www.selfcontained.us/2009/09/16/getting-keycode-values-in-javascript/#comments</comments>
		<pubDate>Wed, 16 Sep 2009 16:49:44 +0000</pubDate>
		<dc:creator>brad</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.selfcontained.us/?p=168</guid>
		<description><![CDATA[I&#8217;ve had to work with getting user input values based off of the keycode from the event a few times, and figured I&#8217;d throw together some of that functionality in case anyone else is wrestling with this functionality.  Below is a simple &#8220;keycode&#8221; object that has a few utility functions, and maps of values [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve had to work with getting user input values based off of the keycode from the event a few times, and figured I&#8217;d throw together some of that functionality in case anyone else is wrestling with this functionality.  Below is a simple &#8220;<strong>keycode</strong>&#8221; object that has a few utility functions, and maps of values to keycodes.</p>
<pre class="brush: jscript;">keycode = {

	getKeyCode : function(e) {
		var keycode = null;
		if(window.event) {
			keycode = window.event.keyCode;
		}else if(e) {
			keycode = e.which;
		}
		return keycode;
	},

	getKeyCodeValue : function(keyCode, shiftKey) {
		shiftKey = shiftKey || false;
		var value = null;
		if(shiftKey === true) {
			value = this.modifiedByShift[keyCode];
		}else {
			value = this.keyCodeMap[keyCode];
		}
		return value;
	},

	getValueByEvent : function(e) {
		return this.getKeyCodeValue(this.getKeyCode(e), e.shiftKey);
	},

	keyCodeMap : {
		8:&quot;backspace&quot;, 9:&quot;tab&quot;, 13:&quot;return&quot;, 16:&quot;shift&quot;, 17:&quot;ctrl&quot;, 18:&quot;alt&quot;, 19:&quot;pausebreak&quot;, 20:&quot;capslock&quot;, 27:&quot;escape&quot;, 32:&quot; &quot;, 33:&quot;pageup&quot;,
		34:&quot;pagedown&quot;, 35:&quot;end&quot;, 36:&quot;home&quot;, 37:&quot;left&quot;, 38:&quot;up&quot;, 39:&quot;right&quot;, 40:&quot;down&quot;, 43:&quot;+&quot;, 44:&quot;printscreen&quot;, 45:&quot;insert&quot;, 46:&quot;delete&quot;,
		48:&quot;0&quot;, 49:&quot;1&quot;, 50:&quot;2&quot;, 51:&quot;3&quot;, 52:&quot;4&quot;, 53:&quot;5&quot;, 54:&quot;6&quot;, 55:&quot;7&quot;, 56:&quot;8&quot;, 57:&quot;9&quot;, 59:&quot;;&quot;,
		61:&quot;=&quot;, 65:&quot;a&quot;, 66:&quot;b&quot;, 67:&quot;c&quot;, 68:&quot;d&quot;, 69:&quot;e&quot;, 70:&quot;f&quot;, 71:&quot;g&quot;, 72:&quot;h&quot;, 73:&quot;i&quot;, 74:&quot;j&quot;, 75:&quot;k&quot;, 76:&quot;l&quot;,
		77:&quot;m&quot;, 78:&quot;n&quot;, 79:&quot;o&quot;, 80:&quot;p&quot;, 81:&quot;q&quot;, 82:&quot;r&quot;, 83:&quot;s&quot;, 84:&quot;t&quot;, 85:&quot;u&quot;, 86:&quot;v&quot;, 87:&quot;w&quot;, 88:&quot;x&quot;, 89:&quot;y&quot;, 90:&quot;z&quot;,
		96:&quot;0&quot;, 97:&quot;1&quot;, 98:&quot;2&quot;, 99:&quot;3&quot;, 100:&quot;4&quot;, 101:&quot;5&quot;, 102:&quot;6&quot;, 103:&quot;7&quot;, 104:&quot;8&quot;, 105:&quot;9&quot;,
		106: &quot;*&quot;, 107:&quot;+&quot;, 109:&quot;-&quot;, 110:&quot;.&quot;, 111: &quot;/&quot;,
		112:&quot;f1&quot;, 113:&quot;f2&quot;, 114:&quot;f3&quot;, 115:&quot;f4&quot;, 116:&quot;f5&quot;, 117:&quot;f6&quot;, 118:&quot;f7&quot;, 119:&quot;f8&quot;, 120:&quot;f9&quot;, 121:&quot;f10&quot;, 122:&quot;f11&quot;, 123:&quot;f12&quot;,
		144:&quot;numlock&quot;, 145:&quot;scrolllock&quot;, 186:&quot;;&quot;, 187:&quot;=&quot;, 188:&quot;,&quot;, 189:&quot;-&quot;, 190:&quot;.&quot;, 191:&quot;/&quot;, 192:&quot;`&quot;, 219:&quot;[&quot;, 220:&quot;\\&quot;, 221:&quot;]&quot;, 222:&quot;'&quot;
	},

	modifiedByShift : {
		192:&quot;~&quot;, 48:&quot;)&quot;, 49:&quot;!&quot;, 50:&quot;@&quot;, 51:&quot;#&quot;, 52:&quot;$&quot;, 53:&quot;%&quot;, 54:&quot;^&quot;, 55:&quot;&amp;&quot;, 56:&quot;*&quot;, 57:&quot;(&quot;, 109:&quot;_&quot;, 61:&quot;+&quot;,
		219:&quot;{&quot;, 221:&quot;}&quot;, 220:&quot;|&quot;, 59:&quot;:&quot;, 222:&quot;\&quot;&quot;, 188:&quot;&lt;&quot;, 189:&quot;&gt;&quot;, 191:&quot;?&quot;,
		96:&quot;insert&quot;, 97:&quot;end&quot;, 98:&quot;down&quot;, 99:&quot;pagedown&quot;, 100:&quot;left&quot;, 102:&quot;right&quot;, 103:&quot;home&quot;, 104:&quot;up&quot;, 105:&quot;pageup&quot;
	}

};</pre>
<p>Typically, you would have an event listener on an input that would call <strong>keycode.getValueByEvent()</strong>.  You would have to pass in the event, (which is by default the first parameter passed into your event listener function).  This code handles the shift key modifier and the value that results from using it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.selfcontained.us/2009/09/16/getting-keycode-values-in-javascript/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
