<?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>Spackos62-Java Blog &#187; appframework</title>
	<atom:link href="http://java.randgestalten.de/index.php/tag/appframework/feed/" rel="self" type="application/rss+xml" />
	<link>http://java.randgestalten.de</link>
	<description>java related stuff</description>
	<lastBuildDate>Fri, 02 Oct 2009 02:08:17 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Appframework and accelerator keys</title>
		<link>http://java.randgestalten.de/index.php/2009/03/appframework-and-accelerator-keys/</link>
		<comments>http://java.randgestalten.de/index.php/2009/03/appframework-and-accelerator-keys/#comments</comments>
		<pubDate>Mon, 02 Mar 2009 23:56:41 +0000</pubDate>
		<dc:creator>Thasso</dc:creator>
				<category><![CDATA[Swing]]></category>
		<category><![CDATA[appframework]]></category>

		<guid isPermaLink="false">http://java.randgestalten.de/?p=110</guid>
		<description><![CDATA[Today I re-researched on the topic of assigning accelerator keys to actions depending on the operating system using java appframework. The problem I have is simple. On Mac OS X the &#8220;meta&#8221; key maps to apples command key. On windows it maps to the &#8220;Alt&#8221; key. And thats is the beginning of all the trouble. [...]]]></description>
			<content:encoded><![CDATA[<p>Today I re-researched on the topic of assigning accelerator keys to actions depending on the operating system using java <a href="https://appframework.dev.java.net/" target="_blank">appframework</a>. The problem I have is simple. On Mac OS X the &#8220;meta&#8221; key maps to apples command key. On windows it maps to the &#8220;Alt&#8221; key. And thats is the beginning of all the trouble. Assume you want to define a &#8220;save&#8221; action. On Mac the shortcut should be &#8220;command-S&#8221;, on windows it should be &#8220;ctrl-S&#8221;. In terms of appframework (or java keystrokes) that means you need:</p>
<pre><code>save.Action.accelerator=meta pressed S</code></pre>
<p>if you are on Mac OS X and</p>
<pre><code>save.Action.accelerator=ctrl pressed S</code></pre>
<p>if you are on Windows. The simple way to to this is</p>
<pre><code>save.Action.accelerator=shortcut S</code></pre>
<p>and &#8220;shortcut&#8221; will map to the meta key on the mac and to the ctrl key on windows. Remember, this is appframework specific and not a real Keystroke definition. I didn&#8217;t find the documentation anywhere ( I am sure it somewhere <img src='http://java.randgestalten.de/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  ), but I found that while browsing the source code. It doesn&#8217;t solve all the problems related to accelerator/mnemonic/keystrokes on differen paltforms ! But, at least for me, it solved 90% of the problems, because we develope <a href="http://bio.informatik.uni-jena.de/epos">our app</a> in english (so no other locales involved) and &#8220;ctrl&#8221; is also fine for the linux/unix/solaris platform. I you want to do more or just want to read more about the problem, there is a <a href="http://markmail.org/message/mqkjgdeigfr6w2t2#query:java%20appframework%20accelerator+page:1+mid:q5thlgty3xlw6kb2+state:results">thread from the appframwork mailing list</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://java.randgestalten.de/index.php/2009/03/appframework-and-accelerator-keys/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
