When you nest a HTML <kbd> inside another <kbd> MediaWiki parses it incorrectly and outputs one <kbd> element and escaped <kbd> tags.
ie: The input <kbd><kbd>...</kbd></kbd>
incorrectly becomes: <kbd><kbd>...</kbd></kbd>
This is very important because HTML5 says this about the <kbd> element:
When the kbd element is nested inside a samp element, it represents the input as it was echoed by the system.
When the kbd element contains a samp element, it represents input based on system output, for example invoking a menu item.
When the kbd element is nested inside another kbd element, it represents an actual key or other single unit of input as appropriate for the input mechanism.
In other words this is valid html:
Which semantically means user input with the nested <kbd> elements identifying individual keypresses.
Note that if you have tidy enabled the bug does not show up.