but why is the shift key pressed at all?
It isn't, you are sending 0x64 directly into the keyboard buffer. This is a lower case d, and that is what I get when I run your code.
If you get an uppercase D then there must be some modifier that your software is taking from your other keyboard.
This is the code I used:-
void setup()
{
Keyboard.begin();
digitalWrite(7,HIGH); // enable pullups on pin 7
while(digitalRead(7) == HIGH) { } // do nothing until pin 7 is pulled low
}
void loop()
{
Keyboard.press(0x64);
delay(100);
Keyboard.release(0x64);
// delay(400);
}
The trigger in the setup is to prevent trouble downloading future sketches as advised in the release notes for the Leonardo.