This is trivial to map on QMK/ZMK mechanical keyboards too, using mod-tap: https://docs.qmk.fm/mod_tap