Spraypainting indoors is a bad idea unless you have a dedicated room or you spray only a little little bit.
Spray mist does not fall only onto the object you paint but can spread around the room and settle everywhere.
I have sometimes sprayed a little little bit in the bathroom, but only to touch things up - not for painting an entire keyboard.
Does your apartment block have a communal yard with a table that is not too crowded with kids? Maybe you would need to ask permission.
You could check out if there is a Maker Space nearby, which could have a painting booth, but they might want a membership fee.
Brushing would leave brush-marks. Marker pens can work for small details - they will otherwise leave streaks.
Another option would be to wrap it in vinyl. There are a few example in the forum of that. The problems are mostly about avoiding bubbles and getting the edges clean.