Hitting the 'right' keys (in the 'wrong' order), looking beyond damage control

by Michael S. Kaplan, published on 2007/10/15 10:31 -04:00, original URI: http://blogs.msdn.com/b/michkap/archive/2007/10/15/5461947.aspx


If you have been reading this blog for a long time, you may recall my The keyboard does not do what I tell it to! post from, inspired from three different issues though most of all from Kate Gregory's Language bar have a mind of its own? from around the same time.

The problem in that case was based on unintended hitting of the "switching" keypress.

You may have also seen my post about The Keyboard Convert Service from later that year which talked about a technique for working backward to get the actual intended letters for those cases where one runs into that problem.

Note that I have never talked about the nature of problem itself -- the accidental typing of the specific keystrokes that cause problems here.

However, Sam Ferenick, in a comment to Kate's post, tried to look into the problem itself more rigourously. His comment:

This behaviour is very puzzling and I am with you on the list of frustrated users. The Alt-Shift really leaks even when you do a proper Alt-Shift-Tab (in other words, both Alt-Shift and Alt-Shift-Tab are applied).

Today, my frustration lead me to a detailed analysis of the problem, and I believe I have found the cause. Here it is:

Alt-Shift only leaks when the Tab key is released before the Shift key. This happens to me often, because I press and release the three keys quickly.

Here is the problematic scenario (A):

1. press Alt
2. press Shift
3. press Tab
4. release Shift
5. release Tab
6. release Alt

And the working (correct) scenario (B):

1. press Alt
2. press Shift
3. press Tab
4. release Tab
5. release Shift
6. release Alt

In scenario B, Alt-Shift-Tab is applied as expected.

In scenario A, Alt-Shift-Tab is applied, PLUS Alt-Shift is applied to the current window. The current window is the one that was on top when Alt was first pressed (event 1.); this is unrelated to the icon on which the "Alt-Tab cursor" is in the "Alt-Tab task-list" at the moment when Alt-Shift-Tab are held down. Other windows than the current one are not affected by the Alt-Shift.

There are other possible orderings of the 6 events (720, theoretically), but the way I use the keyboard shortcut, I am sure events 1 and 6 are in place no matter how quickly I press the shortcut. That leaves us with 24 possible orderings. Then we know that each key is pressed before it is released (6 possibilities left), and that there is a moment when the Shift and Tab are pressed together (because the Alt-Shift-Tab gets applied), which leaves 4 possibilities. Of these 4, two incite the Alt-Tab event (rather than Alt-Shift-Tab), so scenarios A and B are the only two possibilities of what may be happening (at least in my case).

The moral therefore is: learn to press according to scenario B, rather than scenario A.

It seems quite interesting to think about the approach of looking at the problem here in the way of how one is typing things incorrectly rather than just thinking of them in terms of the specific keystrokes that were wrong that one could reverse engineer to get the actual characters, which does not solve the problem but instead just mitigates it. Really a look thrfough the other end of the telescope, as it were....

Can we train ourselves to do this? Does knowing the direct consequences make training to work around the problem easier or harder?

 

This post brought to you by U+0009 (a.k.a. TAB)


no comments

Please consider a donation to keep this archive running, maintained and free of advertising.
Donate €20 or more to receive an offline copy of the whole archive including all images.

go to newer or older post, or back to index or month or day