# Some keybind struggles



## Puremin0rez (Aug 10, 2015)

1) In the original OBS, you could bind things to a controller (such as an Xbox Controller). This is no longer the case, the program simply does not recognize controllers anymore.

2) Shift, CTRL & Alt do not have a different bind depending on what side of the keyboard they are on. (Left Alt, Right Alt, etc does not exist in OBS Multiplatform)


----------



## Puremin0rez (Oct 23, 2015)

... bump?


----------



## Laope (Oct 24, 2015)

bump?
my xbox one controller doesnt work with obs studio. (on original obs work just fine)


----------



## SirCrazyApe (Oct 25, 2015)

Yeah this woulld be nice. I had a keybind for r-shift+s to stream and r-shift+r to record, and I ended up streaming while recording a video because I pressed the l-shift and s at the same time. Now I use alt instead of shift, but sometimes my computer dings when I hit that key combo.


----------



## tajobe (Nov 3, 2015)

1) Yeah, not being able to bind anything on OBS-MP makes playing games with a controller while using it much more difficult than it should be.

2) Again, it would be very useful to be able to bind left and right Ctrl/Alt keys separately to increase the number of usable keybinds.


----------



## KillyMXI (Jul 18, 2019)

It is 2019 already, OBS version is 23.2.1.
But I was quite displeased to discover that I can't have Right Alt configured for Push-to-Talk, as I'm using in Discord and Steam.
It's in my muscle memory, I want it to work the same across all the apps.
And yet, OBS is very special and it triggers every time I Alt+Tab on the left side of keyboard too.
Hotkeys reading must be more detailed to be on par with other software.

Archived topic with the same request: https://obsproject.com/forum/threads/hot-keys-obs-studio.46147/ (almost as old as this one).

I opened an issue: https://obsproject.com/mantis/view.php?id=1507
I hope it will get more devs attention this time.


----------



## dodgepong (Jul 18, 2019)

Unfortunately my understanding is that many of the hotkey issues we have stem from the way Qt handles hotkeys, which is sort of outside our control. I'm not sure what research has been done yet into what can be done about the issues, but it's not as simple as just fixing it. Any solution to this problem will probably end up being more complicated than one might expect.


----------



## KillyMXI (Jul 21, 2019)

5 seconds of googling:
https://stackoverflow.com/questions/11283276/qt-left-ctrl-key-code
https://doc.qt.io/archives/qt-4.8/qkeyevent.html
In Qt there are `QKeyEvent::nativeScanCode()` and `QKeyEvent::nativeVirtualKey()` in addition to `QKeyEvent::key()`.
Qt might not have the same event data on all platforms, so fallbacks should be in place for such cases.
Just don't tell me Windows users can't have it because it doesn't work on someones Macbook.


----------



## dodgepong (Jul 22, 2019)

If you've managed to figure out what the issue is, then feel free to submit a pull request with the changes included so it can be reviewed.


----------



## KillyMXI (Jul 22, 2019)

Well, for me it definitely wont be easy.
I'm not a C/C++ developer and barely touched either of them in my career.
And I'm not familiar with OBS codebase.
From a quick look, I see that the issue is barely related to Qt/UI. That will be easy if it was all about Qt event handling.
Looks like libobs (written in C) handles hotkeys itself, using UI only for configuration. There is a lot of hotkeys-related stuff inside libobs code, and I have no idea how it works.
This is too big issue to pick for me, Qt mention was misleading.


----------

