Not sure if you've already tried this, but setkeycodessetkeycodes might be worth looking into: https://linux.die.net/man/8/setkeycodes.
Also, here's a potentially relevant superuser question: https://superuser.com/questions/633488 How to disable /how-to-disable-re re-map-keyboard-keys-in-the-kernel/974591 keyboard keys in the kernel?
Maybe you can re-map cmdcmd to ctrlctrl with this?