SceneSwitcher icon indicating copy to clipboard operation
SceneSwitcher copied to clipboard

Sending custom input fails in certain applications

Open Destroy666x opened this issue 1 year ago • 5 comments

Describe the bug Bit more of a question than bug report, but I tried custom hotkey (e.g. Q) with a game I'm playing - Minion Masters. Nothing is received by it. I read it's related to UIPI/integrity level on Windows. I'm not too sure if anything can be done about it though, e.g. by elevating the level of Advanced Scene Switcher or OBS.

To Reproduce Steps to reproduce the behavior:

  1. Add custom hotkey actionthat sends e.g. Q
  2. Enter Minion Masters
  3. Execute the action b triggering a condition
  4. Nothing happens

Expected behavior The input should be sent to applications like that

Logs Let me know if needed, don't think so

Version information

  • OS: Windows 10
  • OBS Version: 30.1.2
  • Plugin Version: latest master

Additional context -

Destroy666x avatar Apr 17 '24 18:04 Destroy666x

I think this is related but this would need to be done on OBS side, for which there's basically no chance, right? https://learn.microsoft.com/en-us/cpp/build/reference/manifestuac-embeds-uac-information-in-manifest?view=msvc-170

Destroy666x avatar Apr 17 '24 18:04 Destroy666x

Hm .. not sure to be honest. Does sending the key press to a more basic application like notepad work on your side? Example

WarmUpTill avatar Apr 17 '24 20:04 WarmUpTill

Yes.

The manifest switch I linked can't be applied to Advanced Scene Switcher only as it's a DLL, right? I'll try to build OBS with that flipped one day when I'll have time

Destroy666x avatar Apr 17 '24 20:04 Destroy666x

The manifest switch I linked can't be applied to Advanced Scene Switcher only as it's a DLL, right?

I am at least not aware how something like this could be achieved.

WarmUpTill avatar Apr 18 '24 16:04 WarmUpTill

@WarmUpTill here's some more info that might help or not:

  • I tested the game with AHK, the most popular key sending app on Windows, and it manages to send the Q key with all its sending modes: https://www.autohotkey.com/docs/v1/lib/SendMode.htm regardless whether the script runs as admin or not, too. So might be worth looking at their also C++ source code as to what they doing differently: https://github.com/AutoHotkey/AutoHotkey
  • interestingly, it actually half-works in Minion Masters and half-not. The inputs are only not taken within gameplay, but works e.g. in chat. I asked a dev of the game if they got any idea of why that may be a thing and if the game uses some input blocking or something, but there's no such implementation there and it could be related to how il2cpp handles input
  • my idea is that it could be related to holding the key instead of simply pressing it - maybe there could be a way to disable the holding and just send a single input, to test it for the start?

Destroy666x avatar Oct 07 '24 15:10 Destroy666x