xaer_dev
New Member
Hello everyone!
I am trying to create from scratch a 4 key controller to use it as a scene controller using an arduino uno and some python scripting, but I am having a little problem.
When pressing a button on my controller I translate that key press in 4 different "shortcuts" using the library pynput.
The handling of the key presses is inside a loop so its always listening to changes.
Here is a little snipped of the code I wrote that handles the key presses.
As you can read from the code, the shortcut for the scene_1 is "CTRL + 1", and on my OBS Shortcut Settings I've mapped it to the correct scene:
I've done the same for each button and each scene
(I've got 3, so the shortcuts are "CTRL+1", "CTRL+2", "CTRL+3")
This works just fine with any application (tested on Chrome, Firefox and some others..) but NOT with OBS Studio.
The shortcuts from my actual keyboard work just fine.
Before Reading the log file:
From the time stamp [11:51:07.758] to [11:52:11.409] you can see various scene switches, for these I used my actual keyboard, and not the buttons mapped to the exact same shortcut.
Log File: logfile
I've already tried running OBS as administrator, restarted multiple times the code and the PC.
Is there anything I can do more?
I am trying to create from scratch a 4 key controller to use it as a scene controller using an arduino uno and some python scripting, but I am having a little problem.
When pressing a button on my controller I translate that key press in 4 different "shortcuts" using the library pynput.
The handling of the key presses is inside a loop so its always listening to changes.
Here is a little snipped of the code I wrote that handles the key presses.
Python:
keyboard = pynput.keyboard.Controller()
[...]
def scene_1(keyboard):
keyboard.press(Key.ctrl)
keyboard.press('1')
keyboard.release('1')
keyboard.release(Key.ctrl)
if button_1.isPressed():
scene_1(keyboard)
[...]
As you can read from the code, the shortcut for the scene_1 is "CTRL + 1", and on my OBS Shortcut Settings I've mapped it to the correct scene:
I've done the same for each button and each scene
(I've got 3, so the shortcuts are "CTRL+1", "CTRL+2", "CTRL+3")
This works just fine with any application (tested on Chrome, Firefox and some others..) but NOT with OBS Studio.
The shortcuts from my actual keyboard work just fine.
Before Reading the log file:
From the time stamp [11:51:07.758] to [11:52:11.409] you can see various scene switches, for these I used my actual keyboard, and not the buttons mapped to the exact same shortcut.
Log File: logfile
I've already tried running OBS as administrator, restarted multiple times the code and the PC.
Is there anything I can do more?