Sunday, September 14, 2014

windows 10 - Application Remembers that Alt Key Was Pressed after Alt+Tab Away


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.


Answer



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.


No comments:

Post a Comment

linux - How to SSH to ec2 instance in VPC private subnet via NAT server

I have created a VPC in aws with a public subnet and a private subnet. The private subnet does not have direct access to external network. S...