If Black play 1. ... g5, could White play 2. Kxg5? As you notice, the reason why I asked is Black can not move Knight.
Sorry, despite the pin, kxg5 would still be illegal.