SylphyHornEx icon indicating copy to clipboard operation
SylphyHornEx copied to clipboard

Ctrl + Alt + Delete breaks shortcut handling

Open qobold opened this issue 4 years ago • 8 comments

I could reproduce a bug that, in a few cases, makes SylphyHornEx not react to keyboard shortcuts, for example in the case of after opening Task Manager. At these occasions as a workaround, one has to:

  1. go to the taskbar icon of the app and right-click on it
  2. click options... (I am not sure if, at this point, the 1-2-second lag to open the window has anything to do with the issue)
  3. close the window

Now the app is responsive to the shortcuts again( and if you check the task manager, the app has a few tens of MB-s more memory footprint).

My configurations(switch desktop is not working in the mentioned case): image image

qobold avatar Apr 04 '21 16:04 qobold

Can you please give an exact reproduction? I tried opening the Task Manager and immediately creating a new virtual desktop, and SylphyHornEx still recognizes that. Have you tried running the app as Administrator? Task Manager is a protected process, so it will block any hotkeys from being recognized if you have focused its window.

ViRb3 avatar Apr 05 '21 15:04 ViRb3

As I said "switch desktop is not working in the mentioned case". Not creating a new. :)

It is on the screenshots what is bound to switch desktop right/left. (I guess creating new virtual desktop with Win+Ctrl+D works cuz it is the shortcut for Windows by default as well.) Unfortunately I couldn't reproduce other triggers for the bug (except for opening Task Manager) since they were too sporadic. But what hit me in the case of opening Task Manager is that even after you close it, SylphyHornEx needs to be opened before working again(and this is the case with other causes of the bug too). ( No, I don't run anything as admin in the scenario. )

Reproduction: Run SylphyHornEx as regular user. Bind switch right/left switch virtual desktop to custom like shown above. Open task manager with for example Ctrl+Alt+Del(ete). Do anything except opening SylphyHornEx... Shortcuts bind in the app won't work.

Workaround: Open SylphyHornEx options and close it.

Actually it stops recognizing shortcuts even after Ctrl+Alt+Del(ete) (no need to open Task Manager). And even running SylphyHornEx as admin doesn't solve the issue.

Even more complex situations and workarounds arised by playing around with opening or not opening TM from the Ctrl+Alt+Del menu: Initial state: Everything works Press Ctrl+Alt+Del(ete) Press Esc or Cancel After this (I couldn't figure out any pattern) try combinations of: 1: { Press Ctrl+Alt+Del(ete) Press Esc or Cancel Try shortcuts } 2: { Press Ctrl+Alt+Del(ete) again Open Task Manager this time Navigate focus away from TM Try shortcuts } If shortcuts happen to work: Close TM if open

qobold avatar Apr 05 '21 16:04 qobold

So the problem is actually the Ctrl + Alt + Delete screen. Opening the Task Manager by itself (via taskbar, or Ctrl + Shift + Escape) doesn't have any problem, but I could reliably reproduce the issue in the first case. Thanks for the report. The shortcut handling code is untouched from the original project that this was forked from, so I'm not sure what's happening. If I have time in the future I will look into it, but unfortunately I can't give an ETA.

ViRb3 avatar Apr 05 '21 16:04 ViRb3

I am happy if I could help. :d Thanks.

qobold avatar Apr 05 '21 16:04 qobold

If you fix the issue in code and send a PR I will be more than happy to merge it.

ViRb3 avatar Apr 05 '21 16:04 ViRb3

Naaah, I am noob in C#/PS and win... XD but if I cease to hate these and have some time I may look into it.

qobold avatar Apr 05 '21 16:04 qobold

Which files are associated with shortcut handling code?

qobold avatar Apr 05 '21 16:04 qobold

Not completely sure without looking into it, but look at the files here. There's a lot of Key and Shortcut files.

ViRb3 avatar Apr 05 '21 16:04 ViRb3