Higeeksikh,
Thank you for reaching out Microsoft Community. We apologize for the inconvenience this has caused you.
What I'd like you to do is to check if theSurface Typecover Filter Device is present In Device Manager under Keyboard. It is the driver for the typecover and if it's missing, you can download the driver pack from this link>>https://support.microsoft.com/en-us/help/4023482/surface-download-drivers-and-firmware . Choose your Surface device and select the first msi file and hit next. Let it load and make sure to download it completely.
Once done, go back to Device Manager and check if the typecover driver is still missing, if it is still missing, you might need to try using a different typecover to check if the existing one is already defective or you can reset the device back to its factory settings or uninstall the recent update (if there was) from Control Panel.
If this helps, feel free to mark this post as an answer. Otherwise, don't hesitate to respond to this thread if you need further assistance.
Kind Regards,
Crest_Z