3

When I use Alt+Tab to switch away from an application, then return to that application, the Alt key does not work on the first press. Here's how to reproduce

  • Open Chrome and Notepad++
  • Activate Notepad++ using any method you like
  • Alt+Tab to activate Chrome
  • Alt+Tab to activate Notepad++
  • Press the Alt key one time

The menu in Notepad++ is not activated.

This is reproducible for me using most applications. Notepad++ is the one that clued me in to what's happening, though. When I Alt+Tab away from Notepad++, I can see that the menu selectors (underlines) are visible. They remain visible even as the application is inactive and when I reactivate it. When I return to the app, the Alt key removes the menu selectors - the opposite of what I want it to do.

The only application where this doesn't happen, that I've tried so far, is SQL Server Management Studio (but I've only tried about a dozen). No matter how I activate and deactivate SSMS, the Alt key activates the menu on the first press.

It's easy to see that the menu selectors are being activated in Notepad++, but less easy in applications that use a RibbonUI, like Office. It doesn't show the Ribbon tooltips like pressing Alt alone in the application, but the effect is the same. That is, when I return to the application, I have to press Alt twice to see the tooltips.

It seems like I'm activating the menu before leaving the application, but that's not quite right. It's some weird third state. All other keys except Alt work as expected. If I activate the menu in Notepad++, then press the down arrow key, the File menu expands. But if I Alt+Tab away from Notepad++, then reactivate, the down arrow moves the cursor down one row as expected. So it's not as if Alt is necessarily persisting such that a down arrow would still expand the menu.

I want to Alt+Tab away from Excel, Alt+Tab back to Excel, press Alt+A+C, and not have AC appear in the active cell.

Screen shots: When Alt-tabbing from Notepad++, you can see the hotkeys are underlined in the menu

Alt tab away from Notepadd++

When Alt-tabbing from Excel, no tooltips are shown

Alt tab away from Excel

I can't show you how when I return to Excel and press Alt, nothing happens, because nothing happens. If you can think of a particular screen shot you'd like to see, I'll provide it.

23
  • This might sound silly, but have you tried to reproduce with a different keyboard?
    – Edward
    Commented Oct 10, 2016 at 22:02
  • @Edward No I hadn't thought of that. Thankfully I get the same result (because I love my keyboard and would cry if giving it up was the right answer).
    – dkusleika
    Commented Oct 11, 2016 at 17:44
  • I wonder if I could short circuit this somehow with AutoHotKey,
    – dkusleika
    Commented Oct 11, 2016 at 17:45
  • @dkusleika - My first guess is the "Key Down" event is caught by Excel but that the app switcher catches the "Key Up" so Excel never gets the memo.
    – Edward
    Commented Oct 11, 2016 at 21:58
  • 2
    My take on the issue is that this is unavoidable. Alt-down is sent to the application, then Tab-down gets handled by Windows and switches the focus away. Alt-up is never sent. The rest is just the internal bookkeeping of the application and how it handles the sequence of Alt-down/Focus-out/Focus-in.
    – harrymc
    Commented Oct 12, 2016 at 17:50

4 Answers 4

4
+100

Open registry and go to the following key:
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer
note that you must be in Explorer key and not in its sub trees.
create a new 32-bit DWORD value named AltTabSettings and set it to 1.
Sign out from your Windows 10 session and sign in again.

Note
you can roll back the changes by deleting new value you created.

1
  • Switching back to classic Alt+Tab behavior fixes the problem. It's a shame I have to make that choice, but it's better than not having the choice.
    – dkusleika
    Commented Oct 18, 2016 at 13:59
2

My take on the issue is that this is unavoidable :

Alt-down is sent to the application, then Tab-down gets handled by Windows which switches the focus away. The result is that Alt-up is never sent, so the application menu stays int Alt-pressed mode. When you now do Alt-Tab and give the application back the focus, the first Alt you press just undoes the Menu mode.

The rest is just the internal bookkeeping of the application and how it handles the sequence of Alt-down/Focus-out/Focus-in. Some applications might be intelligent enough to after a focus-out to undo the Alt-down. From your testing it seems that most applications don't handle this case.

This is the behavior that I observe on a new Windows 10 VM and also on my own computer, so this problem is the default condition for Windows 10. It seems like some people do not experience this problem, but the reason why it doesn't happen on their computers is still unknown to me at this time.

6
  • I don't think so. it's related to OS. As questioner says in comments If I'm in Excel and hold down Alt I see the tooltips. But if I Alt+Tab, no tooltips. If Excel was getting the keydown and nothing else, wouldn't the tooltips still appear? this refutes your guess. Furthermore, some users don't have this problem. so it must be solvable.
    – Behroozfar
    Commented Oct 16, 2016 at 19:17
  • that exact "most applications" don't have this issue on my windows 10 OS. so OS should handle this, regardless of application behavior.
    – Behroozfar
    Commented Oct 18, 2016 at 6:48
  • no, even notepad++ works well after Alt Tab to it. it enables menu by one Alt. i don't find even one app on my OS to reacts wrong to this scenario.
    – Behroozfar
    Commented Oct 18, 2016 at 8:32
  • @Behroozfar: It seems from your answer that you are using the old Alt-Tab implementation from XP, and that explains the difference. That's not a solution for people who prefer the current version.
    – harrymc
    Commented Oct 18, 2016 at 17:51
  • I don't use classic old Alt Tab. my current version is same as images of the question and does its job nicely.
    – Behroozfar
    Commented Oct 18, 2016 at 20:47
0

Notepad++ use the Alt button for many shortcuts like

Alt-0 Fold All

Alt-(1~8) Collapse the Level (1~8)

Alt-Shift-0 Unfold All

Alt-Shift-(1~8) Uncollapse the Level (1~8) Hence notepad++ waits for you to press a key and interprets it as a shortcut.

you can disable the shortcuts with Alt

Settings -> Shortcut Mapper
1
  • The problem is the menu, not the shortcuts.
    – harrymc
    Commented Oct 15, 2016 at 14:10
0

Check your windows version at Settings > System > About

If your windows version is 1607, then rolling back to windows version 1511 may solve the problem.

To do this, open the Start screen or Start menu and select Settings. Navigate to Update & security > Recovery. Click or tap the Get started button under Go back to an earlier build to uninstall the current build of Windows 10 and go back to the one you were using previously.

then restart computer and test the issue again.

1
  • NOTE As Windows can get mandatory updates from Microsoft, the issue may return again after some days. Thus if this method can solve the issue, you must take some steps to prevent update.
    – Behroozfar
    Commented Oct 19, 2016 at 20:10

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .