(Don't hate me. Years of Emacs usage is hard to overcome. I even made Emacs bindings for Davinci Resolve...)
It hardware-mapped the CapsLock key to be a modifier for a bunch of other things, basically allowing your right hand never to have to move off the home row.
It's been discontinued but I managed to re-do a lot of the functionality in software using (a somewhat older version of) AutoHotkey: https://github.com/jasonincanada/dot-files/blob/master/optim...
There's one there for dvorak too of course
AutoHotkey seems to operate at a pretty high level in Windows' input processing stuff. There are lower-level APIs and tools available, but which behaviors are you trying to replicate?
AHK has usually worked for me in the past for rebindings, but this problem in particular seems to be too much for it.