This is a tricky question.... because not all guitar tablature is consistent. Usually, when you see a chord symbol for guitar along with an instruction to use a capo, the chord symbol will be "relative to capo" (which will usually be noted on the music)... meaning that the guitar is actually sounding a chord that is different
from what is written. However, sometimes there will be two chord symbols written, one that is "relative to capo", and one that is actually what is being sounded. Occasionally, there will even be only one chord symbol, but it will NOT be "relative to capo", it will simply be what is actually sounding. (I have quite a few chord sheets done up this way. The guitarist capos and plays something other than what is written, yet, with the capo, it still sounds the same as what is written.)
In any case, you always want to play what is actually sounding.
In the case of the "relative to capo" marking, you want to play a chord that is ABOVE (in regards to pitch) what is written. How much above depends on where the capo is being placed. If the capo is placed on the first fret, and the music lists an A "relative to capo," you should play one half-step higher.... so you would play Bb. If the capo was on the third fret, and the music again said A "relative to capo," you would play three half-steps higher.... so you would play C.
In the case where there are two chord symbols written, you want to play the HIGHER (in regards to pitch) of the two symbols. Usually, the chord that you ought to play will be written in parentheses right after the chord that the guitarist is playing "relative to capo." So, if you see something like this in the music: "relative to capo" A (Bb)... you would play the second chord, Bb. (which just so happens to be higher in pitch than A).
In the case where there is only one chord symbol written and there is NO "relative to capo" marking, you should play what is written.
Now... to answer your question. I would assume that the D is relative to the capo, and therefore, that you should play E on the keyboard.
Hope this makes sense, and I hope it helps!
In His love,