user13871: Black can not move his bishop and can not attack the white king  even if the white king captured the black pawn.
Can the white king capture the pawn ?



user13433: No.
The king must not move to a square under attack by an enemy piece, no matter what, even if said attack is currently not allowed. 
If the rule allowed exceptions like this, the logic would chase its own tail: If White is allowed to play Kxf4 - placing his king in danger of getting captured with the excuse that Black (supposedly) can't actually take it next move -, then by the same logic, Black should be allowed to play Bxf4, too - placing his king in danger of getting captured with the excuse that White cannot actually take it next move (because there is no next move as soon as White's king is captured)! But if Black is allowed to play Bxf4, then Kxf4 gets illegal again, because now the danger of recapture is real. 
Thus, to avoid these headaches, White is not allowed to play Kxf4 in the first place.

13871: <p>Black can not move his bishop and can not attack the white king  even if the white king captured the black pawn.
Can the white king capture the pawn ?
<br>
<a href="https://i.stack.imgur.com/YbD13.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/YbD13.png" alt="chess"></a></p>
 13433: <h2>No.</h2>

<p>The king must not move to a square under attack by an enemy piece, no matter what, even if said attack is currently not allowed. </p>

<p>If the rule allowed exceptions like this, the logic would chase its own tail: If White is allowed to play Kxf4 - <em>placing his king in danger of getting captured with the excuse that Black</em> (supposedly) <em>can't actually take it next move</em> -, then by the same logic, Black should be allowed to play Bxf4, too - <em>placing his king in danger of getting captured with the excuse that White cannot actually take it next move</em> (because there is no next move as soon as White's king is captured)! But if Black is allowed to play Bxf4, then Kxf4 gets illegal again, because now the danger of recapture is real. </p>

<p>Thus, to avoid these headaches, White is not allowed to play Kxf4 in the first place.</p>
