Where is the Number fields source code?

I’ve been experimenting with automating the reset to default value function of the number fields via an operator, since it’s not exposed as hotkey-able. I wanted to emulate Ableton Live’s functionality of a double-click to reset the valuebox. I got the operator working alright, but as soon as I click the number field, it switches to text input mode. I think there’s not much to do to get around this… so I figured this could be a good excuse to dive a little into the actual source code.

I’d like to get some pointers. The somewhat broken functionality I got was that I could click on the arrows and the operator would be called. Clicking in the textbox would automatically switch to text-focus (as expected, of course). I worked around it by just using mouse3.

Now, I figured this should be somewhere in /source/blender/interface, but where would the code that specifically controls how much time passes before the box turns into editable text be?

Anything you can throw at me, I’m all eyes.

reset to default value function of the number fields

Try hovering over it and pressing backspace.

I’m aware of that operator, the problem is that it is not open for remapping.

I bridged it via python to respond to the mouse since I’m looking to spare me from the hand swapping, but that’s not the point of the question.

I’m currently snooping around interface_handlers.c. I might have missed it though. I feel it’s probably around there somewhere.