MuseScore -- Index -- Keys

Keys are created or changed by dragging a key symbol from the key palette to a measure or another key.
<F9> toggles the palettes window.

Change
Drag a key from the palette onto a key in the score. You can also drag a key from the score to another key of the score by using <Shift+leftMouseButton+Drag>.

Add
Drag a key from the palette onto an empty part of a measure. This creates a key at the beginning of the measure.

Remove
Select a key and press <Del>.