Rockbox Technical Forums

Support and General Use => User Interface and Voice => Topic started by: mowing-parapet on April 06, 2019, 07:27:03 AM

Title: Delay or "double push" button to lock / unlock?
Post by: mowing-parapet on April 06, 2019, 07:27:03 AM
I have an AGPTEK rocker (I just installed RB, it's great!).  The on/off button functions as key lock in rockbox.  I can see I'm going to be accidentally unlocking it, because it only takes one push to unlock.

What I think I'd like it to do is to only unlock when pushed twice -- or perhaps unlock only after holding the button down for a while.  Actually knowing me I probably need to have it insist on something tapped out in morse code to stop me accidentally unlocking it.

Is there already any feature along these lines?  I haven't been able to find one here / in the manual / browsing the settings.

If not, any pointers to the right area of the code to modify would be appreciated.
Title: Re: Delay or "double push" button to lock / unlock?
Post by: Bilgus on April 06, 2019, 09:07:09 AM
There really isn't functionality built-in to determine a double press of the same button.
The way to do it would be to make it dependent on two buttons like power and select button or something along those lines.
you need to compile your own build to change keymaps
see:
https://www.rockbox.org/wiki/SimpleGuideToCompiling
https://www.rockbox.org/wiki/LinuxSimpleGuideToCompiling