<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Keyboard layouts aren't like Beetlejuice - they won't appear just because you say their name</title><link>http://blogs.msdn.com/b/oldnewthing/archive/2012/10/25/10362537.aspx</link><description>You have to summon them explicitly.</description><dc:language>en-US</dc:language><generator>Telligent Evolution Platform Developer Build (Build: 5.6.50428.7875)</generator><item><title>re: Keyboard layouts aren't like Beetlejuice - they won't appear just because you say their name</title><link>http://blogs.msdn.com/b/oldnewthing/archive/2012/10/25/10362537.aspx#10363571</link><pubDate>Mon, 29 Oct 2012 09:20:47 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10363571</guid><dc:creator>ender</dc:creator><description>&lt;p&gt;I really wish the keyboard layouts didn&amp;#39;t just appear out of thin air - in both Windows 7 and Windows 8 I randomly get switched to US English layout, even though I don&amp;#39;t have it installed (and on Win7 I can&amp;#39;t switch to it with Alt+Ctrl, though I can switch back to Slovenian after this happens). I only have Slovenian layout listed on Control Panel, but this doesn&amp;#39;t prevent Windows from forcing US English on me (and apparently I&amp;#39;m not the only one). This didn&amp;#39;t happen in Windows Vista and older - if the layout was removed from Control Panel there, Windows didn&amp;#39;t switch me to it.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10363571" width="1" height="1"&gt;</description></item><item><title>re: Keyboard layouts aren't like Beetlejuice - they won't appear just because you say their name</title><link>http://blogs.msdn.com/b/oldnewthing/archive/2012/10/25/10362537.aspx#10363134</link><pubDate>Fri, 26 Oct 2012 16:52:20 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10363134</guid><dc:creator>Ryan</dc:creator><description>&lt;p&gt;@mpz Nice to know I&amp;#39;m not the only person annoyed by that. I&amp;#39;d love to know how to get Source engine games to quit mucking around with my keyboard layout.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10363134" width="1" height="1"&gt;</description></item><item><title>re: Keyboard layouts aren't like Beetlejuice - they won't appear just because you say their name</title><link>http://blogs.msdn.com/b/oldnewthing/archive/2012/10/25/10362537.aspx#10363020</link><pubDate>Fri, 26 Oct 2012 11:18:57 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10363020</guid><dc:creator>Jonathan</dc:creator><description>&lt;p&gt;I like how the customer assumes it must the Vista Home Edition, rather than dependent on installed keyboard layouts. When working on Fax software, I had a tester that opened bugs stating that they &amp;quot;repro only on German Windows machines&amp;quot;, while it was the modem he happened to have hooked to those machines. I learned to translate German =&amp;gt; Modem_X in my head.&lt;/p&gt;
&lt;p&gt;-Jonathan&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10363020" width="1" height="1"&gt;</description></item><item><title>re: Keyboard layouts aren't like Beetlejuice - they won't appear just because you say their name</title><link>http://blogs.msdn.com/b/oldnewthing/archive/2012/10/25/10362537.aspx#10363013</link><pubDate>Fri, 26 Oct 2012 10:44:59 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10363013</guid><dc:creator>aylivex</dc:creator><description>&lt;p&gt;@mpz Everybody uses US-English keyboard layout. :))&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10363013" width="1" height="1"&gt;</description></item><item><title>re: Keyboard layouts aren't like Beetlejuice - they won't appear just because you say their name</title><link>http://blogs.msdn.com/b/oldnewthing/archive/2012/10/25/10362537.aspx#10362990</link><pubDate>Fri, 26 Oct 2012 09:22:25 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10362990</guid><dc:creator>JM</dc:creator><description>&lt;p&gt;@Dominic: it can be any input locale identifier previously returned by the Load&amp;shy;Keyboard&amp;shy;Layout function *if you expect the function to actually do useful work for you, or anything else if you don&amp;#39;t*. Honestly, how can we blame people for not using APIs correctly if the MSDN leaves out crucial information like this? Are these things even copyedited? I&amp;#39;d make it something like:&lt;/p&gt;
&lt;p&gt;The seventh parameter to the ToUnicodEx function, which we will name &amp;#39;dwhkl&amp;#39; for convenience but which has no actual name when the function is called [*], must be of the type &amp;#39;HKL&amp;#39;, which will be defined if you include the file &amp;#39;windows.h&amp;#39;.[**] To construct a value of the HKL type that will cause the ToUnicodeEx() function to behave in a manner consistent with the specification, you must call the LoadKeyboardLayout() function. Note that this function can return NULL on error. You must check for this, because NULL is not a valid value for the &amp;#39;dwhkl&amp;#39; parameter to the ToUnicodeEx() function. If you pass a value for &amp;#39;dwhkl&amp;#39; that is not a return value of a call to the LoadKeyboardLayout() function[***], the ToUnicodeEx() function may or may not fail, and this specification provides no guarantees about the actual effects of the function in this case.&amp;quot;&lt;/p&gt;
&lt;p&gt;[*] Consult the documentation of your compiler and/or the C language specification on the topic of formal parameters for more information.&lt;/p&gt;
&lt;p&gt;[**] This specification makes no promises about the nature or size of the HKL type. Please use the HKL type only by including &amp;#39;windows.h&amp;#39;.&lt;/p&gt;
&lt;p&gt;[***] &amp;quot;Call&amp;quot; in this context means a previous function call made by the same process.&lt;/p&gt;
&lt;p&gt;Of course, this is only a rough draft, many essentials are still missing (calling conventions, what a compiler is, how computers work). But it&amp;#39;s miles better than what we&amp;#39;ve got.&lt;/p&gt;
&lt;div class="post"&gt;[&lt;i&gt;You totally forgot to mention the critical details that no intervening &lt;code&gt;UnloadKeyboardLayout&lt;/code&gt; call has been made in the same process with the same handle. Not even calls to &lt;code&gt;UnloadKeyboardLayout&lt;/code&gt; with an uninitialized or improperly-initialized variable which happens to contain the same numeric value as the one returned by &lt;code&gt;LoadKeyboardLayout&lt;/code&gt;. -Raymond&lt;/i&gt;]&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10362990" width="1" height="1"&gt;</description></item><item><title>re: Keyboard layouts aren't like Beetlejuice - they won't appear just because you say their name</title><link>http://blogs.msdn.com/b/oldnewthing/archive/2012/10/25/10362537.aspx#10362893</link><pubDate>Fri, 26 Oct 2012 01:41:28 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10362893</guid><dc:creator>Dominic</dc:creator><description>&lt;p&gt;@Craig: &amp;nbsp;It actually says the hkl parameter *can be any input locale identifier previously returned by the Load­Keyboard­Layout function*, this infers that it can not be anything not previously returned by the Load­Keyboard­Layout function.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10362893" width="1" height="1"&gt;</description></item><item><title>re: Keyboard layouts aren't like Beetlejuice - they won't appear just because you say their name</title><link>http://blogs.msdn.com/b/oldnewthing/archive/2012/10/25/10362537.aspx#10362856</link><pubDate>Thu, 25 Oct 2012 22:16:35 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10362856</guid><dc:creator>Craig</dc:creator><description>&lt;p&gt;&amp;lt;devil&amp;#39;s advocate&amp;gt;Ah, but the documentation only says the hkl parameter *can* come from a previous call to Load­Keyboard­Layout not that it *must*.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10362856" width="1" height="1"&gt;</description></item><item><title>re: Keyboard layouts aren't like Beetlejuice - they won't appear just because you say their name</title><link>http://blogs.msdn.com/b/oldnewthing/archive/2012/10/25/10362537.aspx#10362816</link><pubDate>Thu, 25 Oct 2012 18:58:08 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10362816</guid><dc:creator>Joshua</dc:creator><description>&lt;p&gt;While we&amp;#39;re on the topic of static H values, I know why programs keep being written that think InvalidateRect(NULL, ...) refreshes the desktop.&lt;/p&gt;
&lt;p&gt;HWND_DESKTOP is defined as 0.&lt;/p&gt;
&lt;p&gt;Yes I know it&amp;#39;s only for CreateWindow &amp;amp; friends, but it&amp;#39;s not immediately obvious to someone who sees the definitions but not the documents, so the do InvalidateRect(HWND_DESKTOP, ...) and expect everything to be repainted.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10362816" width="1" height="1"&gt;</description></item><item><title>re: Keyboard layouts aren't like Beetlejuice - they won't appear just because you say their name</title><link>http://blogs.msdn.com/b/oldnewthing/archive/2012/10/25/10362537.aspx#10362805</link><pubDate>Thu, 25 Oct 2012 18:16:39 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10362805</guid><dc:creator>mpz</dc:creator><description>&lt;p&gt;I don&amp;#39;t know if this is related, but one thing that drives me nuts is programs that add new keyboard layouts without consulting me. Steam and Valve games are extremely guilty of this. I usually only have the Finnish and Japanese keyboard layouts installed, but after playing say Half-Life 2, I find that the English keyboard has been added to the leftshift+leftalt keyboard switch procession. Under XP it&amp;#39;d also show up in Control Panel and was easy to remove, but now with Windows 7 it doesn&amp;#39;t even show up there so I have to first add the English-US keyboard and then remove it to get rid of it.&lt;/p&gt;
&lt;p&gt;This infuriates me. Can this be prevented somehow?&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10362805" width="1" height="1"&gt;</description></item><item><title>re: Keyboard layouts aren't like Beetlejuice - they won't appear just because you say their name</title><link>http://blogs.msdn.com/b/oldnewthing/archive/2012/10/25/10362537.aspx#10362802</link><pubDate>Thu, 25 Oct 2012 18:04:45 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10362802</guid><dc:creator>Ron</dc:creator><description>&lt;p&gt;&amp;quot;I had visions of Contoso HR synthesizing a new Bob.Smith on demand.&amp;quot;&lt;/p&gt;
&lt;p&gt;Ha! Comment of the day! :D&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10362802" width="1" height="1"&gt;</description></item></channel></rss>