Agree with the preceding post.
Will add an interim suggestion:
Turn the keyboard upside down over a cloth or paper towels.
Use the heel of your hand to gently tap the ends and sides of the keyboard to knock loose debris that has collected in and around the keys.
Your keyboard may have some gunk stuck around the "d" key. You blow it aside and the key works until the gunk works itself back to causing problems.
Try a knocking it loose a couple of times and use stronger taps.
Also consider pulling off the keycap. May find and be able to remove the gunk.
Nothing to lose...
Then, as suggested, "another keyboard".