Might be unrelated. But I have that issue sometimes as well if I hit x to bring up the minimap.
If I am pressing any buttons before I open it, it will still act like it is pressed after I hit x again.
It isn't too bad though since I know what causes it. I can avoid it pretty easily.