Macbook Air's keyboard's first row is not working when caps lock is off
As the Capslock function is entirely software controlled, it cannot be a keyboard fault.
To test - System Prefs > Keyboard > Keyboard > Modifier Keys…
Switch the capslock key to No Action & the Fn key to Capslock. OK the dialog to set the new keys.
Test by watching the capslock light go on/off as you tap Fn.
test the upper row of keys in each case.
If it is still dependent on the capslock light, it is not a hardware fault. You will have to try track down what software may be responsible. Test another account or from safe boot.