Sometime ago I found how to switch to dvorak layout using the terminal when you’re in the virtual console.
We could use loadkeys dvorak to change the layout.
Now if you want to make Caps_lock into an control key you have to change this file
Change the line that says Caps_lock to control and recompress it.
loadkeys dvorak now remaps the Caps_lock to a control.