I'm assuming you're playing through Dolphin, since you're using a keyboard?
Are you deliberately trying to play on a keyboard, or are you just not able to use a controller? Playing on a keyboard is bad in so many ways; you absolutely can't play properly on one. Even if you're not planning on playing competitively, you will most likely prefer to use a controller once you try it.
You can use an adapter (
amazon.com link here) to play on PC with a controller. If you don't have a controller at all then you can buy those on Amazon too (
Smash 4 type black,
Smash 4 type white). If you don't have a Wii or Gamecube, then 2nd hand ones are quite cheap; you can look on the internet or in local shops that will sell them, or ask people you know if they will give/sell one to you.
You configure your controls in the Dolphin options menu; everything you need is clearly labelled ("Options"->"Controller Settings"->"Configure" for the port/player you want).
If you're just looking for what the buttons do, then the basic controls are below (there are more things but this covers a lot):
A button: normals (when on the ground), aerials (when in the air)
B button: special attacks
X button: jump
Y button: jump
Control Stick: move (walk, dash, run, aerial drift, turn, crouch), jump (by tapping upwards)
C-stick: smash attacks (when on the ground), aerials (when in the air),
L button: shield (when on the ground), airdodge (when in the air)
R button: shield (when on the ground), airdodge (when in the air)
Z button: grab (when on the ground)
All normal and special attacks are directional; you have one for neutral, up, down, and sideways (there's no distinction between forwards and backwards).
For grounded normals, there are weaker "tilt" or stronger "smash" attacks depending on how hard you move the stick for the input; tilt lightly for tilts, smash harder for smash attacks. Each has different uses, like with light/medium/heavy attacks in other fighters.
Holding shield and inputting a direction on the control or C-stick will let you roll (sideways), spotdodge (down), or jump (up). Pressing the A button while shielding will give you a grab.
While you have an opponent in your grab, you choose the direction you throw them with the control stick or C-stick. You can also pummel them using the A button or Z button. There is a distinction between forward and back throws.
If you want more information, then you should read up on advanced techniques and competitive play. Try starting with some of the basic guides linked in
The Melee Library.