Default Hardware buttons not working?

My hardware buttons on the bottom, back home and menu have quit working. I have a hairline crack on the bottom right, but has been working fine with it on there. I flashed the AOSB rom but, i wouldn't think it has anything to do with it not working?
my question, and I believe I know the answer, would flashing back to stock in any way work to fix this problem?