I think mouse and keyboard only works properly in Desktop mode. Not sure if intended or a bug.
My suggestion is to open a support ticket with Valve/Steam. They might help you troubleshoot it, but most likely they will escalate the problem to their dev team as a feature request / bug report.
I recorded a bunch of lectures, either as student or as presenter.
For what you are doing, OBS (or any other software) would have to do miracles to make it any better.
Since you are doing this for yourself, and you are just recording it for later study.
I imagine you do not have the university endorsement or do not have access to the university AV tools in the classroom.
But there are some small things you can do to increase substantially the quality of your recordings.
There are a few ways to go from here, in class, you either:
edit: if you have the slides before the class, and the teacher does not want to use your computer, you can still do this, just make sure you pass the slides when your teacher does on their computer.
[OBS ]You have to set one video source to your slides, and use mic from whatever is better: notebook or webcam.
[SLIDES] if the teacher did not give you the slides, ask to take pictures. This way you can make sure they are good without struggling with room lighting, shadows, people moving in front of the camera and so on. Your phone will do a better processing of the pictures than a webcam will do, and you do not need to wo
It is similar to 2. But the truth is, most phones do a lot of the preprocessing for you, without having to worry about tweaking things.
With a computer, it is not just the recording software you need to worry about, there are so many variables at play and it is nice to read that you are getting aware of those. On a phone, most of those things are taken care for you.
Your only worry would be the battery usage.
After class, get the audio from other students, and pictures or slides.
Use a program to edit video. Like Kdenlive and add the audio tracks and slides to it. You can use the video editor to sync audio and sync visuals. Or use any other tool you prefer.
You want to sync the better audio with the baseline audio you recorded with the slides. Then pick the best audio from each recording you have from other students.
If you did not record OBS with real slides. You probably have terrible visuals, but at least you have an idea when the slides are changed.
Use either the slides provided by the teacher, or the pictures you took for the visual. And match the changes.
I imagine you don't want to a lot of work later and have the final product at the end of the class. But the easiest/cheapest way to have a good result would be a BT lavalier mic on the teacher + slides coming from your computer.
The second would be recording from a phone on a tripod.
Anything else that would not involve work after, would require more endorsement from your uni and your professors.