<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
	
	>
<channel>
	<title>
	Comments on: Figure keypress modifiers	</title>
	<atom:link href="https://undocumentedmatlab.com/articles/figure-keypress-modifiers/feed" rel="self" type="application/rss+xml" />
	<link>https://undocumentedmatlab.com/articles/figure-keypress-modifiers?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=figure-keypress-modifiers</link>
	<description>Professional Matlab consulting, development and training</description>
	<lastBuildDate>Thu, 01 Feb 2018 09:27:36 +0000</lastBuildDate>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.7.3</generator>
	<item>
		<title>
		By: Heiko		</title>
		<link>https://undocumentedmatlab.com/articles/figure-keypress-modifiers#comment-418846</link>

		<dc:creator><![CDATA[Heiko]]></dc:creator>
		<pubDate>Thu, 01 Feb 2018 09:27:36 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=6059#comment-418846</guid>

					<description><![CDATA[On a not directly related note, I found out that if you create a figure with an edit control and you enter the &#039;@&#039; symbol, MatLab closes like it would with the CTRL+Q shortcut. If MatLab is configured to not ask for confirmation, it simply closes without warning. 

Mathworks explains this with the CTRL+Q event forwarded from the figure to the command window. This behavior seems to exist since R2014b. MatLab doesn&#039;t seem to make a distinction between the modifiers  (&#039;@&#039; is CTRL+ALT+Q). The official workaround is to populate the file menu either by clicking on it, or programmatically like this: 

&lt;pre lang=&quot;matlab&quot;&gt;
f = figure;
filemenufcn(f, &#039;FilePost&#039;);
uicontrol(f,&#039;Style&#039;,&#039;edit&#039;)
&lt;/pre&gt;

Alternatively, the confirmation for closing should be activated. Once cancelling the confirmation, the &#039;@&#039; symbol can be used without the effect.

IMHO, this is a critical bug for GUIs using edit fields for email addresses and the like, because data loss is very likely.]]></description>
			<content:encoded><![CDATA[<p>On a not directly related note, I found out that if you create a figure with an edit control and you enter the &#8216;@&#8217; symbol, MatLab closes like it would with the CTRL+Q shortcut. If MatLab is configured to not ask for confirmation, it simply closes without warning. </p>
<p>Mathworks explains this with the CTRL+Q event forwarded from the figure to the command window. This behavior seems to exist since R2014b. MatLab doesn&#8217;t seem to make a distinction between the modifiers  (&#8216;@&#8217; is CTRL+ALT+Q). The official workaround is to populate the file menu either by clicking on it, or programmatically like this: </p>
<pre lang="matlab">
f = figure;
filemenufcn(f, 'FilePost');
uicontrol(f,'Style','edit')
</pre>
<p>Alternatively, the confirmation for closing should be activated. Once cancelling the confirmation, the &#8216;@&#8217; symbol can be used without the effect.</p>
<p>IMHO, this is a critical bug for GUIs using edit fields for email addresses and the like, because data loss is very likely.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Daniel Castano		</title>
		<link>https://undocumentedmatlab.com/articles/figure-keypress-modifiers#comment-405159</link>

		<dc:creator><![CDATA[Daniel Castano]]></dc:creator>
		<pubDate>Fri, 21 Apr 2017 07:42:54 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=6059#comment-405159</guid>

					<description><![CDATA[This info has made may life so much easier in the past months.... thanks!

I&#039;m wondering if the Figure class has some equivalent property for the behaviour of the mouse, i.e., a property that expresses if (in the moment of reading the property) the mouse is pressed, and which button.]]></description>
			<content:encoded><![CDATA[<p>This info has made may life so much easier in the past months&#8230;. thanks!</p>
<p>I&#8217;m wondering if the Figure class has some equivalent property for the behaviour of the mouse, i.e., a property that expresses if (in the moment of reading the property) the mouse is pressed, and which button.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Yair Altman		</title>
		<link>https://undocumentedmatlab.com/articles/figure-keypress-modifiers#comment-361418</link>

		<dc:creator><![CDATA[Yair Altman]]></dc:creator>
		<pubDate>Thu, 12 Nov 2015 22:34:06 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=6059#comment-361418</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://undocumentedmatlab.com/articles/figure-keypress-modifiers#comment-361410&quot;&gt;julien&lt;/a&gt;.

When the window does not have focus then it should not handle any key-press event. It is the responsibility of the window that does have the focus to process it.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://undocumentedmatlab.com/articles/figure-keypress-modifiers#comment-361410">julien</a>.</p>
<p>When the window does not have focus then it should not handle any key-press event. It is the responsibility of the window that does have the focus to process it.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: julien		</title>
		<link>https://undocumentedmatlab.com/articles/figure-keypress-modifiers#comment-361410</link>

		<dc:creator><![CDATA[julien]]></dc:creator>
		<pubDate>Thu, 12 Nov 2015 20:44:52 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=6059#comment-361410</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://undocumentedmatlab.com/articles/figure-keypress-modifiers#comment-361223&quot;&gt;Yair Altman&lt;/a&gt;.

Actually, when figure has not the focus, java &#039;KeyPressed&#039; event is not triggered. So, impossible to know when the clic is done which modifiers are pressed...]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://undocumentedmatlab.com/articles/figure-keypress-modifiers#comment-361223">Yair Altman</a>.</p>
<p>Actually, when figure has not the focus, java &#8216;KeyPressed&#8217; event is not triggered. So, impossible to know when the clic is done which modifiers are pressed&#8230;</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Yair Altman		</title>
		<link>https://undocumentedmatlab.com/articles/figure-keypress-modifiers#comment-361223</link>

		<dc:creator><![CDATA[Yair Altman]]></dc:creator>
		<pubDate>Tue, 10 Nov 2015 14:35:05 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=6059#comment-361223</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://undocumentedmatlab.com/articles/figure-keypress-modifiers#comment-361220&quot;&gt;julien&lt;/a&gt;.

You can use the KeyPressedCallback property at the Java-frame level, then you don&#039;t have any of these limitations.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://undocumentedmatlab.com/articles/figure-keypress-modifiers#comment-361220">julien</a>.</p>
<p>You can use the KeyPressedCallback property at the Java-frame level, then you don&#8217;t have any of these limitations.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: julien		</title>
		<link>https://undocumentedmatlab.com/articles/figure-keypress-modifiers#comment-361220</link>

		<dc:creator><![CDATA[julien]]></dc:creator>
		<pubDate>Tue, 10 Nov 2015 13:33:48 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=6059#comment-361220</guid>

					<description><![CDATA[Indeed, this is convenient. However, when figure has not focus, &#039;CurrentModifier&#039; property is not updated. So if you hold a modifier key when figure has not focus and you then clic in the figure, &#039;CurrentModifier&#039; property is not correct. Do you know a way to fix this?]]></description>
			<content:encoded><![CDATA[<p>Indeed, this is convenient. However, when figure has not focus, &#8216;CurrentModifier&#8217; property is not updated. So if you hold a modifier key when figure has not focus and you then clic in the figure, &#8216;CurrentModifier&#8217; property is not correct. Do you know a way to fix this?</p>
]]></content:encoded>
		
			</item>
	</channel>
</rss>
