Skip to content

Conversation

@sabudum
Copy link

@sabudum sabudum commented Aug 23, 2025

…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.

…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.
@sezanzeb
Copy link
Owner

Thanks, seems to work well!

After recording something, the "Record" button greys out:

image

It shouldn't do that anymore then, right?

@sabudum
Copy link
Author

sabudum commented Aug 25, 2025

Thanks, seems to work well!

After recording something, the "Record" button greys out:

image 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.

@sezanzeb
Copy link
Owner

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

@sabudum
Copy link
Author

sabudum commented Aug 25, 2025

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

Figured it would be, but could not find the code where it is being set.

@sezanzeb
Copy link
Owner

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.

@sabudum
Copy link
Author

sabudum commented Aug 28, 2025

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'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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants