For MuseScore 3 users, see Key signatures
Key signatures can be created or changed by dragging one from the Key Signatures palette to a measure, or onto an existing signature.
F9 (Mac: fn+F9) toggles the palette window.
Replace an existing key signature
Drag a key signature from the palette directly onto a key signature in the score. If you want to change the key signature to only one staff of your score (which might be done in some contemporary music, for example), press Ctrl (Mac: ⌘) while dragging the key to the right staff.
Add a new key signature
Drag a key signature from the palette onto an empty part of a measure. This will place the key signature at the beginning of the measure. If you want to add the key signature to only one staff of your score (which might be done in some contemporary music, for example), press Ctrl (Mac: ⌘) while dragging the key to the right staff.
Remove a key signature
Click on an existing key signature and press Del, or drag the empty key signature from the palette (in the advanced workspace) onto the measure.
Courtesy key signature
In the Inspector for a selected key signature, there is an option for "Show courtesy." Additionally, Style → General... → Page has on option for "Create courtesy key signatures". The Inspector will affect only the selected one; the style setting will affect the entire score.
Naturals on key signature changes
You can choose whether to show natural(s) in certain cases when changing the key signatire. Under Style → General... → Accidentals you'll see the options:
NOT FOUND: Key_signature-Naturals_en.png
You can Apply the changes, or click OK. If you are in a linked part, rather than in the primary score, you can apply the change to all parts with the corresponding button.
In this example, the key signature change is showing naturals.
Key signature and multimeasure rest
Multimeasure rests are interrupted, if there is change in the key signature.
Courtesy key signature and section break
A courtesy key signature will not be shown just before a section break
See Break or spacer: Section break
Custom key signatures
Press Shift+K to bring up the master key signature palette.
You can even use half-flats, half-sharps, etc.
Note, however, that currently the playback of custom key signatures is not supported.