Just to be clear, I believe you mean using Via (keyboard.frame.work) to set a key to a mouse button, such as Mouse Btn1.
I’m afraid, it seems mouse keys aren’t enabled in the default keyboard firmwares. You’d need to compile new firmware, after adding MOUSEKEY_ENABLE = yes
to /keyboards/framework/rules.mk.