handle post of key