8000 Impose stricter constraints on keycap? · Issue #246 · docbook/docbook · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Impose stricter constraints on keycap? #246

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
ndw opened this issue Jan 23, 2023 · 0 comments
Open

Impose stricter constraints on keycap? #246

ndw opened this issue Jan 23, 2023 · 0 comments

Comments

@ndw
Copy link
Contributor

In private email, the observation is made that

  <keycombo>
    <keycap function="control"/>
    <keycap>C</keycap>
  </keycombo>

would lead to "Ctrl+C" in English and "Strg+C" in German.

But

<keycap function="control">foo</keycap>

is incoherent. The suggestion is that it should be an error for a keycap with a function attribute to be non-empty.

I'm inclined to agree. Out of curiosity, I went back and looked at what the 1.0, 2.0, and xslTNG stylesheets do with this case. AFAICT:

  1. The 1.0 stylesheets favor the content, ignoring the function attribute if the content is non-empty. Curiously, the 1.0 stylesheets don't seem to support the function value "other" and otherfunction at all.
  2. The 2.0 stylesheets also favor the content and treat the otherfunction value as the content if it's present. For function values they use gentext to create the content.
  3. The xslTNG stylesheets also favor the content, and treat both the function and otherfunction values as keys for a gentext lookup.

At least they're all broadly the same, but it seems very reasonable to call <keycap function='control'>C</keycap an error. I suppose it's possible that someone, somewhere has a processing system that treats that markup as "Control-C", but I don't think that would be justifiable from the processing expectations:

The keycap identifies the text printed on a physical key on a computer keyboard.

Unless someone has a keyboard with a "Ctrl-C" key, I suppose. (Insert lame Emacs joke here.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant
0