Well, I've figured it out, or at least a workaround!
I installed the KeyEvent Display app from the Play Store, which gives you the scan codes for the keys you're pressing. By using it, I found out that the headset "volume down" button has key code 114, and "volume up" has code 115.
So, I've...