by Michael S. Kaplan, published on 2008/07/16 10:01 -04:00, original URI: http://blogs.msdn.com/b/michkap/archive/2008/07/16/8736898.aspx
Yesterday in The keys are so hot, they're smoking!, I did something that you won't see me doing very often.
I waxed on at length about a feature as a really exciting thing for people to use.
I'll now admit that when I did that, it was mostly a setup.
Because today I am going to prove that:
So we will start by adding three keyboards under three different languages to my usual setup -- in this case Latvian, Lithuanian, and Luxembourgish (The "L" Word languages in Europe):
This will give us the following view in that Advanced Key Settings tab:
Because this is Vista we will get the three shift states and twelve character choices:
The two characters at the end are ~ (U+0073, aka TILDE) and ` (U+0060, aka GRAVE ACCENT).
We're gonna need a few more keyboards here for what I want to do. Let's go back and add three more, under those same languages (just for fun):
Okay, this will give us the list to die for:
Six entries plus the English I started with.
Okay now, to quote Antonio Banderas from Desperado right before he started shooting up the bar, Let's Play.
Among these six keyboards, let's use that Change Key Sequence... dialog, to add hot keys to each of them:
Okay, do you see What we have here?
Now if you have a US keyboard you might notice the problem here.
Yes, that is right -- the tilde is the shift state to the grave's base state.
In other words, there are not six unique states here at all -- the user interface just thinks there is. All of the TILDE entries without a SHIFT in them have an implicit one built in, and all of the GRAVE entries with a SHIFT do not exist since the SHIFT changes the characters.
Let's hit the Apply button now and see what happens:
Uh oh! Somebody silently removed our CTRL + GRAVE ACCENT that was on the Latvian keyboard.
But the rest were left.
Let's fix it and try again:
Okay, that one stayed fixed but now two others are gone.
Third time, will it be a charm? Let's see:
Um, not exactly -- not only is one missing, but another one is now duplicated on the list but without the hot key. And we can't add it back either as it is no longer on the list:
And kind of broken, given that we have now broken the UI and half of the ones that are there are not going to work the way we want them to anyway.
If you keep doing this, eventually you hit a non-steady steady state of something like this:
But let's pretend that this is not a problem for a moment.
And we'll look at some keyboard layouts:
All of this kind of underscores the point from Punctuation keys can make lousy shortcuts, because even if we do not know whether these hot keys are CHARACTER based or VIRTUAL KEY based, we know that neither the characters nor the virtual keys can be relied on for being in all keyboards or in the same positions even when the are present.
Sometimes they are there but the VK values are different, sometimes they are on other keys, sometimes they are actually dead keys (and believe me the interaction when they are dead keys almost deserve their own bug report!).
So basically between half and all of these entries are going to be kind of broken, depending on the layout you choose.
And of course there are those duplicated entries to help us keep it all in perspective:
Then we can try Estonian instead since both the character and the VK are different there:
As this will give us more somewhat broken entries for hot keys, unless you do them this way:
Though even if you do them right for the English keyboard (to switch to Estonian), you may not have them right for the Estonian keyboard (to switch to English) which does not have them both there.
Not much room for gray area here -- there are just a whole heap of bugs here that have as far as I know never been reported and some of which have existed for any versions.
Kind of provides a possible answer to Centaur's wondering:
I wonder what is the target audience for these hot keys.
Fictional users? :-)
I'll talk about the next problem tomorrow....
(Keep in mind we are keeping away from the IME topic, for now!)
This blog brought to you by ` and ~ (U+0060 and U+007e, aka GRAVE ACCENT and TILDE)
Asztal on 16 Jul 2008 4:19 PM:
I tried to abuse this oddness to some effect, assigning Alt-Shift-0 to switch to English and Alt-Shift-` to switch to Hungarian (effectively creating a single shortcut to switch between the most common two, since the Hungarian layout's 0 is in the same place as the UK layout's `), and 1-3 to switch to other, less common, specific layouts.
Unfortunately it didn't work, as the dialog simply deleted Alt-Shift-0 most of the time (it seems to like doing that). When I got it to not delete either of them, Alt-Shift-0 worked, but Alt-Shift-` didn't do anything :(
Doesn't work with Ctrl-`, either. I'm slightly confused.
Oli on 17 Jul 2008 8:35 AM:
I use Left Alt+Shift+0 to switch to "English (United States) - US" and Left Alt+Shift+1 to switch to "French (Canada) - Canadian French" all the time in Windows XP and Windows 2003 (I haven't owned a Windows Vista machine yet).
Sometimes I'll notice that the "Switch between input languages" has been somehow reset to Left Alt+Shift (I haven't determined what causes this), but other than that, I haven't had problems with this feature. (please don't take it away!)
Mode isn't a problem because I keep the language bar on my desktop in semi-transparency mode near the top-right corner (very few windows have titles that long) and so I can always give a quick glance in that direction, although it's fairly obvious when I'm in the wrong mode and it takes 0.2 seconds to switch. :)
C'est aussi simple que ça!
Frode A. on 17 Jul 2008 10:07 AM:
I used to use this feature back on XP when I first moved to Canada so I could write Norwegian characters to my friends and family back home on emails and MSN.
Although I can't really remember exactly why, I eventually stopped using it and started replacing the characters with their combination counterparts (aa, ae, oe) due to the flaky nature of the hot keys feature.
I tried it again on Vista, although being about two years at the time since I moved (and last used a NO keyboard), I ran into a slight snag of mixing the location of the three extra letters. Hence I turned it off and didn't really get to try it out that much.
I do like the feature however. Maybe I could put little stickers on my keys so I'd know where they are when I'd need them. Anyway, hopefully it can get a little more attention next time around to weed out these kind of problems.
Mihai on 18 Jul 2008 1:28 PM:
This is what happens when one tries to replace a standard control (in this case the HotKey control) with some improvised "better" solution (in this case two comboboxes).
Custom controls/solutions are hard to get right, because many many many hours went into designing/implementing the standard controls. The chances I can come up with something better for some stand-alone project are very slim.
go to newer or older post, or back to index or month or day