When the following movement in a score is going to be in a different key the player is sometimes warned by printing a key signature change after the closing barline. The attached file accomplishes this, but I wonder if there is something less hacky that does this. In particular the spacer rest duration matters but what it is doing exactly seems a mystery.
Richard Shann
\version "2.22.0" \markup {Movement I} { c'' c'' c'' c'' c'' c'' \bar "|." \key bes \major s16 } \markup {Movement II } { \key bes \major c''4 c'' c'' c'' c'' c'' \bar "|." }