You asked
Should I switch from the pentax k 5 to mirrorless?
The guide's default for a first camera is a mirrorless body with an APS-C sensor. It says mirrorless cameras show the exposure before you shoot, and their autofocus finds and follows eyes. If your Pentax K-5 frustrates you on those points, that's a real reason to switch. The site doesn't cover specific mirrorless bodies or adapters, though, so it can't name a model to move to or give a price for one. Read Your first camera for the general case.
Before you switch, check what's actually holding your photos back. The K-5 has in-body stabilisation and a large Pentax lens range. For dim light and moving subjects, the guide says a fast lens and a larger sensor matter more than stabilisation, which steadies the camera rather than the subject. A faster lens may fix your problem without a new body. The Pentax smc DA* 55mm f/1.4 SDM is one fast option that works on your K-5. The guide's aperture explanation shows why an f/1.4 lens gives so much more light than a typical zoom.
If your problem is mostly autofocus with fast subjects, or you want a smaller camera for travel, a switch makes more sense. Keep your K-5 lenses in mind, though, because the guide treats the lens as the bigger investment and the body as the cheaper part.
Written by Claude from this site's pages.
From these pages
This answer is for the question above. Each answer is written for the exact question in its address, so a question with its details in it (a budget, what you shoot, what you already have) gets an answer about those details. An answer draws on all 15 pages of the guide and its catalogue of 320 cameras and 1050 lenses. Another question gets its own answer at its own address, as words after /ask/. Or fill in your own: /ask/which-camera-for-{what-you-shoot}-under-{budget}-euros or /ask/which-lens-for-{what-you-shoot}-on-{your-camera}.