Enter accidentals in system text

Sometimes I put note names above very high or low notes with a large number of leger lines to assist reading, like D with a flat. How can I enter accidentals in system text attached to notes, as opposed to text frames?

You can use staff text (be careful, system text is alt-shift-x and will have the same behavior as Tempo markings or Rehearsal marks), but I’d rather create a Playing technique with the ♭♮♯ glyphs if you need them, and an easy popover name to call them. My 2 c.

Sorry, I meant staff text (I am a newbie).

The question, perhaps poorly phrased, was actually, how can I enter a sharp or a flat? Using {@flat@} has no effect, neither does {@266D@} - they just print literally.

And by extension, I often need other Unicode characters for note annotations of various sorts, so how to do that?

You have to go to the SMUFL site, copy the glyph (not its Unicode), and paste it as a Music Text item (notice the first (None) thing at the top left of the editor? Click on it and select Music Text).
The advice I gave you about Playing techniques does stand. I really think it’s more convenient!
BTW, I’m an active XeLaTeX user, so I understand where you come from. I simply could not get used to Lilypond’s code to be so far from music notation, but if you browse this forum, you’ll notice I’m a total TEX fan.

The unicode tokens like {@ flat @} only work in text frames, not in text objects.

Why not? Reasonable question?

Because all tokens only work in text frames, at least currently - and I couldn’t say whether or not that’s planned to change.

Would be a good feature request.