How long does it take to plays keys is a loaded question.
If you just want to learn how to play chord progressions or lay down some string lines it does not take too long. Some people (in particular if they have inherent musical talent) can start picking out general melodies almost immediately. Learning basic major, minor and 7th chords can take a few day to a couple of weeks.
Learning to actually "play" takes a lifetime.
If you know scales and understand the most basic of theory (enough to figure out that a major triad is the 1+3+5, etc.) you can quicky figure out chords, etc. Obviously correct technique takes a lot longer.
When I first started playing keyboards (I'm actually a drummer) I ppicked up a cheap keyboard at learned my scales and chord progressions farily quick - I then went to a teacher and asked to learn basic theory (circle of 5ths, etc. etc.) - then I played to every record I owned.
It all depends on what level of playing you want to achieve. There are several videos for basic info "Learn To Play Keyboards", "Learn To Play Rock Piano", etc.