For dyeing a few dozen caps, I used about half a package of RIT powder in about a liter of water, with a half teaspoon of salt.
I brought it to a boil, stirred quite a bit, and strained it through a fine metal kitchen strainer after it looked like it had dissolved.
With the dye at, or very near boiling, it should not take long. For scarlet, I did it once, brought them out, rinsed and dried them, then did it again. The 2nd bath made the color a lot richer and more even.
Do make sure that the keys are absolutely clean and grease-free, or the results are sure to be bad.