Malfunctioning of keyboard My MacBook keyboard is not functioning properly . If I type a it shows aq1 and also for a and q . For s sw2 and so on . I have tried running it in safe mode but it didn't help .the problem is only with alphabets and numerals all other keys are working properly . Strangely p, z, x , c,v,b, n and m are also working
Check your keyboard settings.

Go to  System Preferences... > Keyboard then the Input Sources tab.

Depending on your language, you should be able to see the current layout.

Keyboards can be configured for different languages and different layouts.  The US Keyboard standard is commonly called QWERTY as many physical keyboards are laid out that way.  Notice the keys from Q to Y left to right.  If you see your preferred layout there and it is not currently selected, change it.



UPDATE: Check that your keyboard may not have physical damage (liquid) by pugging in an external keyboard via USB or Bluetooth if you have one available.  If the external operates properly, there could be some physical damage.  If it operates the same as the built in keyboard, then the problem is in software.