No, this is not the way. You do *not* include usb_keyboard.h.

In Arduino's Tools > USB Type menu, you select a type with Keyboard. No #include is used.

See File > Examples > Teensy >...