Here’s one for the 4-button P02 Pico (Bright/Cooking/Dining/Off) that handles short clicks, long clicks and double-clicks: