Added automatic stopping and re-starting of injection when recording …
…input.
When hitting the record button to grab inputs for remapping. If the preset is currently running, the program will stop it temporarily until recording finishes, then re-start the injection afterwards.
Thanks, seems to work well!
After recording something, the "Record" button greys out:
It shouldn't do that anymore then, right?
Thanks, seems to work well!
After recording something, the "Record" button greys out:
It shouldn't do that anymore then, right?
Tried to solve that, but couldn't find the cause. You can select a different mapping and the button un-greys, for instance just click on the "b" mapping there and it would un-grey.
Also, editing a mapping with the preset injected, the changes don't reflect immediately, you have to re-inject by re-recording the same button, if you get what I mean. So if you record "H", map it to something, then press Record again, and press H again for it to reload the preset. Otherwise it won't work immediately after remapping it.
Probaby some usage of set_sensitive controls the recording button. https://lazka.github.io/pgi-docs/#Gtk-4.0/classes/Widget.html#Gtk.Widget.set_sensitive
Probaby some usage of
set_sensitivecontrols the recording button. https://lazka.github.io/pgi-docs/#Gtk-4.0/classes/Widget.html#Gtk.Widget.set_sensitive
Figured it would be, but could not find the code where it is being set.
I this case you could add a print statement above all the calls to set_sensitive and then run the application. The information printed to the console could help you to figure out which call it is.
Once you figured that out, you can use traceback.print_stack() to understand how it is called (Or follow the usage of methods and classes through the code).
Or use a debugger and breakpoints.
I this case you could add a print statement above all the calls to
set_sensitiveand then run the application. The information printed to the console could help you to figure out which call it is.Once you figured that out, you can use
traceback.print_stack()to understand how it is called (Or follow the usage of methods and classes through the code).Or use a debugger and breakpoints.
I've traced all calls to set_sensitive() There's only one call that disables the Record button. And it is called when no active mapping is selected. My guess is that when the injection starts it clears the selected mapping, but also couldn't find how to solve that.
It shouldn't do that anymore then, right?