Template:K

This template formats and displays a key signature for all the major and minor keys up to seven sharps or seven flats. Major keys use upper-case letters; minor keys use lower-case letters. If the note pitch is flattened, the letter b follows the pitch name; if sharpened, the hash character # is used. These characters are formatted into the appropriate musical symbols.

A second template, {{Key}}, is used on work pages to also add a category entry for the work. This version of the template does not add the key category.

An invalidly entered key will display an error message linking to this page.

Examples

  1. {{K|C}} C major
  2. {{K|d}} D minor
  3. {{K|Eb}} E major
  4. {{K|F#}} → F major
  5. {{K|bb}} B minor
  6. {{K|B#}} → Invalid key