by Michael S. Kaplan, published on 2012/04/26 07:01 -04:00, original URI: http://blogs.msdn.com/b/michkap/archive/2012/04/26/10297903.aspx
It was almost 4½ years ago that I wrote some basic rules.
Rules for developers.
Rules for developers about keyboards.
I was even faux pompous enough to refer to them as my Michael's Keyboard Laws for Developers. :-)
The first law: VK_A is not always 'A'.
The second law: Not every keyboard contains every VK_* value.
The third law: Not every keyboard contains every character.
The fourth law: Not every individual keystroke is relevant.
Now over those 4½ years, I have been able to answer 49 different questions sent to me by email with at least one of those laws.
Then, yesterday, a new situation came up.
One that was not covered by the laws.
I realized that perhaps a new law would be needed.
And to prove that I am more efficient than the US Congress (even under the best of circumstances, which these days certainly aren't!), that law is being posted just 24 hours later! :-)
This law is somewhat obvious, but the consequences of it aren't always so obvious, even after the issue -- and the law -- have been pointed out.
And now, without further adieu, the fifth of Michael's Keyboard Laws for Developers:
<CTRL>+<C> and <CTRL>+<ALT>+C will stop each other from doing their jobs
You might wonder why I would find it so important that I make this a law, when it seemed like I had closed the Canon over 1600 days ago.
Especially when it seems so obvious!
Well, perhaps if I expanded the fifth law with a corollary of sorts, to act as a proof for my claim that non-obvious consequences exist:
<CTRL>+<C> and <CTRL>+<ALT>+C will stop each other from doing their jobs, and <CTRL>+<ALT>+C is the same thing as <ALTGR>+<C>
Recognize the issue now?
The one where Word's "helpful" shortcuts so frequently stomp on keyboard letter assignments?
It's the one I talked about in previously in blogs like 'To start press the ALTGR key.' Hmm... where's the ALTGR key? and Intuitive is in the eye of the beholder and Multilingual keyboards and Microsoft Word and Get off my freaking key! and Detecting ALTGR can only hope to work when ALTGR is in fact there.... and Detecting ALTGR fails when ALTGR isn't there (Just Czech-ed out in Word 2007) and Virtual PC + Word 2007 ≠ AltGr support?.
Every single one of these seven blogs was inspired by people asking about problems related to this issue.
Raymond Chen even mentioned some of the consequences here, in Why Ctrl+Alt shouldn't be used as a shortcut modifier.
And I talked about Tavultesoft's Marc Durdin's advice to Word on how to handle themselves less stupidly (Robust key message handling in Windows) in The key to key messages is a key contribution.
With all that coverage, I'd say people should have wondered why there wasn't a law, and that it was about time someone made it one....
THUS, this blog today!
Now, the specific case in the problem brought up so recently was in a Windows 8 component related to PowerShell where they found their handling of <CTRL>+Q interrupting the Hungarian keyboard's handling of <AltGr>+Q, since it is also <CTRL>+<ALT>+Q.
They were going to fix this bug even before I pointed out the wider issue covered by this law, which may suggest to some that in at least some ways PowerShell is more World Ready than Word, which hasn't fixed this issue in their product despite 8 blogs from me over a 4 year period, one of which included a link to specific instructions/suggestions on how to fix/ameliorate the problem.
But that might come off as bitter, so I'm not going to go there today. ;-)
In actuality, this blog today has an entirely different purpose.
Today's blog, as well as the other four Michael's Keyboard Laws for Developers, are something I will be using to provide serious guidance for an issue that an STE or SDE/T might find even more useful.
Something I will be talking about soon in another blog....
Random832 on 26 Apr 2012 9:13 AM:
"<CTRL>+<C> and <CTRL>+<ALT>+C will stop each other from doing their jobs"
Why is this? They're easily distinguished - surely there's a way to detect that alt is not pressed.
Michael S. Kaplan on 26 Apr 2012 10:08 AM:
There is. But a disappointing number of software design engineers mess this up, in both small and large scale situations....
referenced by
2012/05/02 Who owns keyboard testing?