Keys getting stuck going in/out of menus

Not sure if anyone else has encountered this issue, but regularly I’ll go into my inventory, shift/alt-click something to assign it to either hand, and then when I exit my inventory, it’ll be ‘stuck’ on that click, basically machine gun firing whatever’s in that hand.

This isn’t too terrible for most thing, albeit somewhat annoying, but when it’s a chisel it can be rather destructive…