labstreaminglayer / App-LabRecorder

An application for streaming one or more LSL streams to disk in XDF file format.
MIT License
128 stars 45 forks source link

can we prevent spacebar from stopping a recording? #108

Closed xoffey closed 1 year ago

xoffey commented 1 year ago

We use LabRecorder as part of a suite of tools, and sometimes an experimenter's keystroke accidentally arrives at LabRecorder, causing it to stop recording, Is there any way to prevent LabRecorder from stopping when the spacebar is stroked? This is a problem especially because resuming recording causes an extra xdf file to be created, which is very undesirable. I have looked at the source code, but could not see where a keystroke is mapped to the stopRecording function.

cboulay commented 1 year ago

It's just Windows. You can operate windows without a mouse. There's probably a way we could specifically disable keyboard interaction with a button in our GUI but that's bad for overall usability, especially for those KB-preferring users.

I think your solution is to simply press <tab> after you've started recording so LabRecorder no longer has the start/stop button in focus. Your spacebar hit might do something else in the GUI (like Refresh?!) but it should be less harmful.

xoffey commented 1 year ago

Thanks for the timely response. I know it sounds simple to press tab, but our users, smart as they are, somehow are having trouble. I wouldn't propose changes for broader consumption, but I'd love to know what I could change in the code for our particular users. Is there, say, something in MainWindow that makes "stop" be the default button?

cboulay commented 1 year ago

I suppose you could follow this advice: https://stackoverflow.com/a/58390168

However, instead of going down that route, I recommend you switch to using LabRecorderCLI and just provide your own simple GUI to control it.

xoffey commented 1 year ago

Thanks, that might be the way to go. BTW, we are running on Ubuntu, not windows.