Punch and roll writes a "D"-Letter in the text-lane

Punch & Roll does not work properly, because first it starts to write a “D”-Letter in the text-lane. WHEN you press ESC then, it might work.
You have to change the keycode

Which version of Windows?
Which version of Audacity? (look in “Help > About Audacity”)

Try resetting the Keyboard Preferences back to defaults. See here:https://manual.audacityteam.org/man/keyboard_preferences.html