Hi....if its USB keyboard then check with connections and it is recommended to connect the USB at back of the computer .........
If it is Keyboard with normal port then ...it may be the issue with the keys .....if it is more than one year then just replace the keyboard with a new one.....sometimes it happens with old keyboards.