After hitting or holding the button "k," the compass pulls up like normal and operates correctly, however a constant (and loud) beeping sound recurs constantly, overlapping with itself. The beeping is ended after pressing the "k" button again. The problem is not affected by the difference between holding and pressing the button. I believe what is happening, is a glitch relating to the bearing readout in the top-right. I think that it is set to play a beeping sound when the compass is pulled up just to draw attention to it. I think the sound I am hearing caused by this issue is that beeping sound looping constantly.
EDIT:
Alright, so I did more research into it, and so far, I've only been able to recreate the glitch on the Soldiers of Destruction Goonies TDM server. I've also noticed that the bearing readout that appears does not appear in vanilla gameplay, although the server advertises that it is vanilla.
I also checked to see if it was the compass that was the issue or "k" and it turned out that after switching the control for the compass and using the new one, it did not recreate the issue.