Wednesday, February 19, 2003

Dave complains about docbook markup for key sequences. Actually, docbook can convey that the control key is pressed, just as he wants it to. He is right to complain about that example, though, because the example is wrong! The <keycap> tag is supposed to represent the text written on a key on the keyboard. So the "Control-H" example:

<keycombo action="simul">
<keycap>C</keycap>
<keycap>h</keycap>
</keycombo>

Is wrong because the Control key has "Ctrl" written on it, not "C", and the "H" key has "H" written on it, not "h". The correct markup would be:

<keycombo action="simul">
<keycap>Ctrl</keycap>
<keycap>H</keycap>
</keycombo>

If it's the idea of Control-H that is more important than what is written on the keys, then maybe <keysym> expresses that better than <keycap>.

No comments: