Of course it works!
Here's a more germane example:
Short-Press - Long-Press Keyboard Shortcut Example v1.00.kmmacros (9.1 KB)
This method isn't perfect, because Keyboard Maestro is listening to the system and emulating key-presses and is not a driver-level utility. Even so – chances are pretty fair that it'll be good enough for your purposes.
If you need something more sophisticated the only thing I know of is Karabiner-Elements – it does run at the driver level.
-Chris