welcome to the forum
you might want to read the " in depth review " done when the K 5 came out
Pentax K-5 Review - Introduction | PentaxForums.com Reviews
_____________________________
this chart shows how the K 5 works with the various Pentax lenses
it is the fourth line down on the left side of the chart
Pentax Lens Compatibility Chart
Copyright 2006-2016 Mosphotos.com. All rights reserved.
Pentax bayonet lenses labeled "SMC Pentax" are referred to as "K" lenses in the table below. Other Pentax bayonet lenses have the lens designation as a part of their name as in "SMC Pentax-FA."
Note that "star" lenses work like their "non-star" counterparts: DA* lenses work like DA lenses, FA* like FA, F* like F, A* like A, and M* like M.
Exceptions: FA and F "soft" lenses behave like M lenses in terms of metering.
The Pentax Camera Lens Compatibility Chart
______________________________________________
and then there is this section of the forum might be of interest
https://www.pentaxforums.com/forums/115-pentax-k-5/