You need an Arduino with 'native' USB. A Micro, Due, Teensy and a few others will work.
Using keyboard.h is like having a second keyboard plugged into your system. Having it send a key code to the computer is like pressing that key on a second keyboard. For many games, this is OK. If you're actually typing a letter at the time then you don't want the key to appear in the letter.
With all of those above Arduinos you can use them as "HID" Human Interface Devices. Basically like a gamepad or joystick. If Teamspeak can be set up to use a joystick button as the PTT then that will work very well.