  We calculate the branching ratio and $CP$ violations for $B\to K\pi$ decays
in a modified perturbative QCD approach based on $k_{T}$ factorization. The
resummation effect of the transverse momentum regulates the endpoint
singularity. Using the $B$ meson wave function that is obtained in the
relativistic potential model, soft contribution cannot be suppressed
effectively by Sudakov factor. Soft scale cutoff and soft $BK$, $B\pi$ and
$K\pi$ form factors have to be introduced. The most important
next-to-leading-order contributions from the vertex corrections, the quark
loops, and the magnetic penguins are also considered. In addition, the
contribution of the color-octet hadronic matrix element is included which is
essentially of long-distance dynamics. Our predictions for branching ratios and
$CP$ violations are in good agreement with the experimental data. Especially
the theoretical result of dramatic difference between the $CP$ violations of
$B^+\to K^+\pi^0$ and $B^0\to K^+\pi^-$ is consistent with experimental
measurement, therefore the $K\pi$ puzzle in $B$ decays can be resolved in our
way of the modified perturbative QCD approach.
