Often need to replace flex ribbon when this happens, if this happens across all ROMs then it is most likely hardware
If you don't want to open it up and fix it then get an app from play store like floating keys as a workaround
Sent from my Nexus 7 using XDA Premium 4 mobile app
XDA Developers was founded by developers, for developers. It is now a valuable resource for people who want to make the most of their mobile devices, from customizing the look and feel to adding new functionality. Are you a developer?