@mcgregni will correct me if I'm wrong, but I do believe Pentax, Nikon and Canon all use the same basic physical hotshoe fitting, the difference being that the automatic functions will not work, sophisticated TTL or other orders will not be passed correctly to or from the camera body, and the only command that will be passed is "fire at full power" (or whatever is set manually on the flash).
This means that if all you want to do is pass a "fire flash" command, the Nikon and Canon ones should work.
However, as has been said, there is a PC sync port on the side of the camera (on the K-5 it is just below the manual flash raising button on the left hand side of the pentaprism, covered by a little knurled knob which can be hard to unscrew but is very easy to lose), and this offers an alternative. You are looking for something like this:
Impact SCS-MPC PC Male to Hot Shoe Sync Cord (12") SCS-MPC
I am pretty sure that of all the things which have changed since the golden days of film, the PC Sync connector is not one of them.