Return dict from reg2key() to make code more readable