H
like-gold
Trouble with OBS recognising "Key" and "multipleKeys" commands as hotkeys
OBS doesn't seem to recognise hotkeys sent through homeassistant using the "Key" and "multipleKeys" commands.
This issue can be replicated and also bypassed using the python library
pyautogui
.
The following code exibits the same symptoms as HASS.Agent.
These two code snippets fix the issue
and
It seems like OBS doesn't recognise instantaneous keypresses, so hotkeys needs to be held down for a while for them to be executed.
HASS.Agent doesn't hold the keys down.
What would the best way of using these hotkeys in homeassistant be then?
Just one of these python scripts modified to take an argument of the keypress? Then set it as a custom command?
As a long term solution, it would be great if HASS.Agent supported a duration
attribute for both keypress commands directly so we don't have to rely on workarounds.7 Replies
We have had this before, though I think the conclusion was that the library we use to do keypresses doesn't work this certain apps.
@Amadeo
As of now if the software is "too slow" to detect the keypress it won't work
I have on my todolist to check if we can specify for how long it can be pressed (because if we do it the kiss way - just sleep for the amout of time user wants to keep the key pressed - whole command thread will be blocked)
Alternative is to allow user to specify if they key is supposed to be pressed or held, with the catch that "lifting up" the button would be on user's side
@brozorb I just did a POC of the above, want to be a beta tester?
it's not perfect since keys need to be configured as separate commands and you need to "switch them on and off" but at least it's something
like-goldOP•4w ago
sure
do you have gihub account?
for reference: https://github.com/hass-agent/HASS.Agent/issues/323
GitHub
Feature: ability to hold down button with KeyCommand · Issue #323 ...
Some software has issues detecting key presses made with KeyCommand and MultipleKeysCommand. Is your feature request related to a problem? Please describe. 3rd party software not detecting key pres...
like-goldOP•4w ago
I'll build it and ping you on gh