kvakulo / Switcheroo

The humble incremental-search task switcher for Windows
www.switcheroo.io
GNU General Public License v3.0
789 stars 122 forks source link

Pressing enter #27

Closed jaredbidlow closed 9 years ago

kvakulo commented 9 years ago

Hi! Just a quick question even though you already closed the issue :)

Did you experience any problem while using Switcheroo, or maybe some feature that didn't make immediate sense?

/Regin

jaredbidlow commented 9 years ago

I needed to test it, and forgot about the issue. On my computer at work pressing alt tab + enter switches to a window. On my home computer just pressing alt tab and releasing switches to a window.

Another problem with the first (at work) computer is that pressing enter will sometimes submit the enter command to the program I am switching to.

I would like an option for either enter or just release to switch windows as well as a fix to passing on the enter command to the window that I am switching to. On Sat, Feb 21, 2015 at 7:41 AM Regin Larsen notifications@github.com wrote:

Hi! Just a quick question even though you already closed the issue :)

Did you experience any problem while using Switcheroo, or maybe some feature that didn't make immediate sense?

/Regin

— Reply to this email directly or view it on GitHub https://github.com/kvakulo/Switcheroo/issues/27#issuecomment-75370026.

kvakulo commented 9 years ago

Thanks for the update @jaredbidlow!

I'll quickly describe how Switcheroo is intended to work:

As default Switcheroo can be activated using the hotkey Alt+Space, but it is possible to enable the Alt+Tab integration by going to Options and checking the option Activate Switcheroo with Alt+Tab.

After enabling the Alt+Tab integration, and then pressing Alt+Tab the Switcheroo window should open up, and stay open until you press Enter to go to a window, or Esc to dismiss the Switcheroo window.

Now back to your experiences:

On my computer at work pressing alt tab + enter switches to a window

That sounds like Switcheroo works as intended in this scenario.

On my home computer just pressing alt tab and releasing switches to a window.

Is the Alt+Tab integration enabled on your computer? And do you see the Switcheroo window after pressing Alt+Tab?

About this issue:

Another problem with the first (at work) computer is that pressing enter will sometimes submit the enter command to the program I am switching to.

That is certainly not intended, and should be fixed. I do need a few details to better debug this:

Does it happen when switching to arbitrary windows, or only windows from a specific program? Which version of Windows do you run? Which version of .NET do you have installed? (http://smallestdotnet.com/)

I would like an option for either enter or just release to switch windows

There are a couple of options:

  1. If you prefer Alt+Tab ... Enter, then it should already work
  2. If you prefer Alt+Tab without pressing Enter, then you could simply use Switcheroo when pressing Alt+Space, but disable the Alt+Tab integration, and thereby use the default Windows functionality for this
  3. If you prefer Alt+Tab without Enter, but still prefer the window listing that Switcheroo provides, then that needs to be added to Switcheroo as a configuration

Which one do you like the most? :)

/Regin

jaredbidlow commented 9 years ago

Now that I'm using my home pc, The switch on release of alt + tab is no longer a problem. I have no idea how it happened, but I'll let you know if it reoccurs. I will let you know on Monday what .Net version the work pc has. It is Win7 and the problem occurs with two programs, both old programs build by my company used to navigate client's data

As for the main implementation, I don't know, if others have requested this, then yes. I have used Switcheroo for months and don't see myself returning to the style of the Windows alt + tab functionality. It caused too much wasted time because I found myself switching windows too often without being mindful of where I was going.

kvakulo commented 9 years ago

Please keep me updated on the situation on your home PC. I have some further clarification that might explain what has happened. If you have the Alt+Tab integration in Switcheroo turned on, but press Alt+Tab while having a program in focus that is running under for example the Administrator user, then Switcheroo can't detect that key press, and in this case the usual Windows Alt+Tab functionality will open up. This happens because Switcheroo runs under your normal user account, and for security reasons therefore is not allowed to detect key presses to processes running under other users (I'll open a separate ticket for this issue)

For your work PC, I have a suspicion that something like this might be going on:

  1. Switcheroo is activated
  2. A window is selected and Enter key is pressed
  3. The selected window is focused and activated
  4. The Enter key is released
  5. The window gets the message that Enter was released and acts upon this

I'll experiment and see if I can recreate this scenario. (The solution might be not to switch to the new window until Enter has been released.)

/ Regin

kvakulo commented 9 years ago

I reproduced the issue with Enter being pressed in Switcheroo, but the other window receiving the Enter release message. I have tried to make a fix to this issue in #34.

Here's a version of Switcheroo with the fix included: http://teamcity.codebetter.com/repository/download/Switcheroo/182507:id/switcheroo-portable.zip

Could you try to run it and tell me if it solves the problem on your work PC?

/ Regin

jaredbidlow commented 9 years ago

It did. Thanks

kvakulo commented 9 years ago

That's great! I'll make sure to include the fix in the next release.

Let me know if you run into any other issue.

/ Regin