What commands to use to emulate arduino uno as a keyboard input device?

I want to use my arduino uno as an input device for playing Osu! I want to set my mechanical switches to press Z and X. Can anyone tell me how to code that? I don't know how to program it nor which hole I need to use to connect my arduino and mechanical switches. Is the picture right?

Do I need more parts like Resistors/Diodes/Breadboards and etc. to make this work?

The Uno can not emulate a Keyboard. The Leonardo, and other boards with 32U4 chips, can.

Thanks... But do i need more parts such as diodes/resistors/breadboard and such?

FlippEdSIDEx:
Thanks... But do i need more parts such as diodes/resistors/breadboard and such?

Yes, you need more parts. You need a Leonardo. Until you have one, you are wasting your time, and ours.