If a keyboard is going to go wrong, the keys usually forms a structure in a diamond shape. If yours is only affected by one key, it may be that something is just stopping k doing its job. You could hover a vacuum cleaner to release, perhaps, a toast crumb, from sitting under the key.
Alternatively, you could pick up the keyboard and put it on your shoulder and tap it's back in the way you may have burped a baby. If nothing falls out, you might try unclipping the key by prying it upwards.
Use a cocktail stick -wooden or plastic - because metal could cause some damage. With the key cap off, can you use the key by pressing the soft button you can see now?
But I wanted to now why is it perfectly working in safe mode and not when coming back to normal mode. And also when I remote logged-in to my laptop it perfectly gives the input. And I forgot to mention that it works fine when plugged into laptop.