Hello bathi22,
Welcome to Apple Support Communities!
We want to ensure the keyboard is working perfectly on the MacBook Air.
Let's check if the battery is low which could cause an issue with the keyboard, detailed here:
"If no keys work on your Mac notebook computer’s built-in keyboard
- Your Mac may be showing a low battery alert that you can’t see. Connect your Mac to an electrical outlet or connect an external keyboard to your Mac to see the alert."
This Apple Support page has the full details and additional steps to take if the issue remains: If your Mac doesn’t respond to key presses - Apple Support
We hope this helps to resolve the issue and get the keyboard working consistently.
Cheers!