Shaun McCance
shaunm@gnome.org >2008-2009
Mark up a key combination or sequence.

# Tastensequenzen

    mal_inline_keyseq = element keyseq {
      attribute style { xsd:NMTOKENS } ?,
      attribute type { "combo" | "sequence" } ?,
      attribute * - (mal:* | local:*) { text } *,

      mixed {
        (mal_inline_key | mal_inline_keyseq) *
      }
    }

Use the `keyseq` element to mark up a key combination or sequence. Use the `key` element to mark up each individual key press. You can use text without markup to indicate a class of keys, such as arrow keys, or to indicate a mouse action.

# Anmerkungen

Das `keyseq`-Element kann eine Mischung aus Text, `key`-Elementen und weiteren `keyseq`-Elementen enthalten.

The `keyseq` element can occur in any general inline context, including inside most inline elements, some basic block elements, and certain informational elements.

The `style` attribute takes a space-separated list of style hints. Processing tools should adjust their behavior according to those style hints they understand.

The `type` element indicates whether the keys should be pressed together (`"combo"`) or in sequence (`"sequence"`). The default is `"combo"`.

The `keyseq` element can have attributes from external namespaces. See for more information on external-namespace attributes.

# Beispiele

Use `keyseq` to mark up a keyboard shortcut:

Press <keyseq><key>Ctrl</key><key>Q</key></keyseq> to quit.

Drücken Sie Strg Q, um zu beenden.

Use `keyseq` with text for classes of keys:

Press <keyseq><key>Shift</key>arrow keys</keyseq> to make a continuous selection as you move the keyboard focus.

Press Shiftarrow keys to make a continuous selection as you move the keyboard focus.

Use `keyseq` with text for mouse actions:

<keyseq><key>Shift</key>click</keyseq> to make a continuous selection.

Shiftclick to make a continuous selection.

Verwenden Sie verschachtelte `keyseq`-Elemente, um komplexe Tastaturbefehle darzustellen:

Press <keyseq type="sequence"><keyseq><key>C</key><key>x</key></keyseq> <keyseq><key>C</key><key>s</key></keyseq></keyseq> to save a file in <app>Emacs</app>.

Press C x C s to save a file in Emacs.

Since classes of keys and mouse actions are written without surrounding markup, you can't have two consecutive key classes or mouse actions. You can overcome this limitation by using nested singleton `keyseq` elements:

There are various ways to modify drag behavior by using <keyseq><keyseq>modifier</keyseq>drag</keyseq>.

There are various ways to modify drag behavior by using modifierdrag.

# Processing Expectations

Each of the child `key` elements and text nodes, except whitespace-only text nodes, is displayed as described below, adding a separator between them. The exact separator may vary according to language and style preferences, and according to the `type` attribute. For sequences, a space is typically used. For combinations, the plus sign (+) is most frequently used on modern systems, although the hyphen (-) is still common in some areas. A style hint may be used to choose between different separators.

Child `key` and `keyseq` elements are shown as normal. Text nodes have their whitespace normalized to strip leading and trailing spaces. Text nodes may be rendered using a font variation.

# Vergleich mit anderen Formaten

The `keyseq` element is similar to the `keycombo` element in DocBook. Like `keycombo`, `keyseq` elements can be nested to indicate sequences of key combinations. Since Mallard does not provide an element analogous to the DocBook element `mousebutton`, mouse actions in key sequences should be written as text content without markup.