LaunchyQt icon indicating copy to clipboard operation
LaunchyQt copied to clipboard

[Enchancement] Game or full screen detection

Open KnightTim opened this issue 2 years ago • 1 comments

Is your feature request related to a problem? Please describe. My keyboard shortcut for opening Launchy has always been Ctrl+Space, when playing many video games Ctrl is crouch and Space is jump, there are times where I press both and open Launchy during a game and it takes focus.

Describe the solution you'd like There are a few solutions I can think of:

  1. Have a list of processing that if active Launchy will ignore input
  2. Detect if an app is full screen (covering the taskbar) and ignore input
  3. Have an option to remap the opening keyboard shortcut at runtime based on certain input. (This could be either a built in feature or a plugin)

Describe alternatives you've considered Setting up Autohotkey or something similar to detect the launch of a game and close Launchy and then reopen Launchy when the game is closed.

Additional context If trying to detect fullscreen might need to be smart about detecting if there are multiple monitors.

KnightTim avatar Oct 03 '21 02:10 KnightTim

I was doing some research on how easy it would be to get the currently active process name. If you had that it wouldn't be hard to compare to a list of processes and ignore the activation.
I'm hoping I can get some time and write a snippet of code for getting the process name, comparing it to a list and then returning a bool. Hopefully with that it would be easy for someone familiar with the code base to suggest how to integrate it.

For reference (mostly for myself) here are a few resources that look useful.

  • https://stackoverflow.com/questions/48735215/getting-executable-name-of-current-focused-window
  • https://stackoverflow.com/questions/466354/how-can-i-tell-if-a-window-has-focus-win32-api
  • https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-getactivewindow?redirectedfrom=MSDN
  • https://web.archive.org/web/20030807084141/http://www.microsoft.com/msj/0397/Win32/Win320397.aspx

KnightTim avatar Oct 10 '21 02:10 KnightTim