How to have auto-repeat arrow keys on Launchpad Mini MK3?

Hello everybody who have a little knowledge in Python (more than me , for sure)

I have a LaunchPAD mini MK3 connected to a RPI4 with Zynthian OS Oram running

The ctrldriver for this device works very well , but in some cases arrow keys are not very efficient

When you have to scan a long list of presets , you must press the button countless times to get to , for example preset number 50.

So it would be nice to have some kind of auto-repeat for CUIAs “ARROW_UP” and “ARROW_DOWN”

the piece of code of the driver is

    elif evtype == 0xB:
        ccnum = ev[1] & 0x7F
        ccval = ev[2] & 0x7F
        if ccval > 0:
            if ccnum == 0x5B:
                self.state_manager.send_cuia("ARROW_UP")
            elif ccnum == 0x5C:
                self.state_manager.send_cuia("ARROW_DOWN")
            elif ccnum == 0x5D:
                self.state_manager.send_cuia("ARROW_LEFT")
            elif ccnum == 0x5E:
                self.state_manager.send_cuia("ARROW_RIGHT")
            else:
                col, row = self.get_note_xy(ccnum)
                if col == 8:
                    if row < 7:
                        self.zynseq.select_bank(row + 1)
                    elif row == 7:
                        self.zynseq.libseq.stop()
        return True

so at every push of one of the arrow button 
one CUIA is used and the selection bar goes up or down (or right or left)

I tried to replace the if statement with a while but it does not work

I do not know enough of Python 
so if somebody can help getting something like

"As long as the down button is pressed 
send x times CUIA "ARROW_DOWN" and 
when button is released send no more CUIA"

It must not be "Rocket Science" for somebody knowing Python 

:winking_face_with_tongue:

Thank you for reading

Alain