Rotated Grid Bug?

Hello everyone, just a few minutes ago I was trying to rotate a selection of about 15 brushes that conform a building I was working on, but then while I rotated the elements I accidentaly pressed the movement keys wasd and then the grid of the viewport just rotated in a wird angle and I dont know how to fix it, Im not sure if its a bug.