I also want to retain the existing built-in Windows 'Show Desktop' function (i.e. hide all windows, then focus Desktop) and have this activated by a long-press of Win D.
In theory it's not too difficult to achieve these two outcomes, but the problems I'm having are to do with various unwanted side-effects due to me not knowing how best to structure the code.
Issues I'm struggling to resolve are:
- Being able to long-press and have the 'Show Desktop' feature activate with or without hotkey release.
- Preventing multiple triggers when long-pressing the hotkey (should only fire once until key is released, regardless of keypress duration).
- Using the real Show Desktop feature that can restore open windows to previous state (not a manual minimize command)
- Getting each subsequent long-press to alternate between Show Desktop and 'Unshow' Desktop (instead of only activating 'Show' Desktop)
- Not interfering with any other use of the Win key (either on its own or in other Win key combinations)