Got a Pentax K mount (PK) lens and tried to use it with my K-x. The camera didn't work. Found the following article at http://support.pentaximaging.com/node/1. It is very useful.
When shooting, you have to use '+/-' button to set the shutter speed based on the preset of aperture size, and to press the shutter to take an image. The good thing is that the focus confirming signal in the K-x viewfinder works with my Vivitar 50mm lens, which has no 'A' on its aperture ring.
How about the M42 screw mount lenses and any lenses mounted via a adapter? They should work too.
Using Older Lenses with the PENTAX K-x
Q: Can I use older PENTAX lenses on my K-x?
A: Yes. PENTAX A-series lenses (lenses with an "A" setting on the aperture ring), can be used as manual-focus lenses in all exposure modes on a PENTAX K-x.
PENTAX K-mount, M-series and S (screw) mount lenses without auto-aperture control (an “A” setting on the aperture ring) can be used in Manual exposure mode using stop-down metering and manual focus. This is the exposure mode which will give accurate exposures when using these older lenses on our digital SLRs. If older lenses without an "A" setting on the aperture ring are used in Av (Aperture Priority) Mode, an exposure error may occur.
Note: Using PENTAX S (screw) mount lenses on a PENTAX DSLR requires the use of a Pentax Mount Adapter K.
To set up your PENTAX K-x to use older PENTAX lenses:
Press the Menu button
Press the left button on the four-way controller to get to page 4 of the Rec. Mode menu
Press the down button on the four-way controller, select Green Button
and press the right button on the four-way controller.
Press the down button on the four-way controller, select Action in M Mode
then press the right button on the four-way controller and select Tv SHIFT. Press the OK button then the Menu button twice.
(This setting allows easy and accurate exposure metering using older lenses without an "A" setting on the aperture ring. When the Green button is pressed in Manual exposure mode, the lens "stops down", the camera's meter measures the light passing through the lens, and an appropriate shutter speed is automatically set based on that measurement).
Press the Menu button
Press the left button on the four-way controller to get to the Custom Settings menu
Press the down button on the four-way controller and select Using Aperture Ring
Press the down button on the four-way controller, select Permitted and press the OK button.
Press the Menu button to exit the Custom Settings menu
Note: when using lenses without an "A" setting on the aperture ring, Manual exposure mode must be used. Exposure can be set by adjusting the lens aperture ring and/or adjusting the shutter speed on the camera.
Note: pressing the Exposure Compensation button (the +/- button) on the K-x will automatically set an appropriate shutter speed in Manual exposure mode when using non-"A" series lenses.
If Shake Reduction is enabled when using an older lens, you will need to manually select the closest matching focal length from the Input Focal Length menu. To do this:
Turn the camera off. Mount the non-"A" series lens. Turn the camera on.
The Input Focal Length screen will appear. Use the rear e-dial to select a focal length which is closest to the focal length of the lens you are using. If you are using a zoom lens, choose a focal length close to the midpoint of the zoom range of the camera.