Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#297 Extending function Attribute for keycap Element

v5.1
closed-fixed
Norman Walsh
5
2013-02-19
2012-07-05
Thomas Schraitle
No

According to the TDG[1], keycap contains some values to markup "special" keys. For example, function="control" maps to the control key (written as "Ctrl" for an English keyboard[2]).

However, there is no distinction between "Alt" (left alt key) and "Alt Gr" (right alt key). Furthermore, there is also no difference between "return" and "enter". Here are some reasons why I think the schema should be extended to support these values:

* Consistency: It is much more consistent to write <keycap function="alt"/> or <keycap function="altgr"/> and rely on the DocBook stylesheets to do the right thing.
* Language Support: Some keyboards could name the "Alt Gr" key differently than in English.
* Translation: Translators doesn't have to know how to translate a key (although I would assume a translator e.g. from English to German would know the German key names, but I think, it safer to bother them with this minor details and improve consistency.)
* Layout: "Exotic" keys can be mapped to a image during processing.
* Validation: Having a list of possible values makes it easier to spot errors.

I know, there is the “other” value in function and the otherfunction attribute to markup even more exotic keys. However, I think, the above distinction is such a basic thing that it should be included in DocBook.

Maybe the committee thinks about adding this feature not only to DocBook v5.x but also to version 4.5.

Thanks.

---- References
[1] http://www.docbook.org/tdg5/en/html/keycap.html
[2] http://en.wikipedia.org/wiki/File:Qwerty.svg

Discussion

  • Norman Walsh
    Norman Walsh
    2012-11-14

    Fixed for 5.1

     
  • Norman Walsh
    Norman Walsh
    2012-11-14

    • status: open --> open-accepted
     
  • Norman Walsh
    Norman Walsh
    2012-11-14

    • status: open-accepted --> open-fixed
     
  • Robert Stayton
    Robert Stayton
    2013-02-19

    • status: open-fixed --> closed-fixed