As mentioned, you can pop off the keys, but it would be difficult to protect the letters from getting painted. It's not impossible; just put a little tape over the letter and peel it off after the paint has dried. However, that's a hassle and would make the paint job look crappy.
Another option would be to get pre-cut letter stencils small enough for keyboard keys and repaint the letters onto the keys after painting them. And no, I don't know where you could get those.