Short Press/Long Press Keyboard Shortcuts

I've been looking around both the new and old configuration menus and can't seem to find a way to do this so I figured I'd ask here.

I'm looking to assign a single key to both sleep and lock my MBP, what I was hoping to do was assign something like hold ESC down for 3 seconds and then release for sleep and then hold ESC down for 5 seconds and then release for lock. Is that possible?

I previously had these functions assigned separately to the F14 and F15 keys on my full size external keyboard, but I've since shifted to a 60% sized keyboard so those keys don't exist for me.

In the mean time, I've assigned them to Shift+Ctrl and Shift+Option which is relatively easy to trigger, but I was hoping to just put them on a single key with a short and long press.

1 Like

just boosting this, would love long press keyboard shortcuts