Updating button label based on modifier keys held down in real time?

I'm trying to figure out if there is a way to somehow update the label of a button in real time somehow :thinking:. Maybe through an add-in script or something.

For example, for toolbar or context menu buttons that have several @keydown options set, a way to make it so the label changes in real time as you hold down different keys (shift/alt/ctrl), to remind you which each modifier does (where the user would set what label shows for the different keys held).

If it's not currently possible I wouldn't consider it an urgent feature request, since I could potentially see it being infeasible depending on how/when buttons get drawn behind the scenes.

There is.

@label:KeyDown("ctrl") ? "CTRL" : "Not CTRL"
@keydown:ctrl

Awesome that works!

For context menus it only seems to update upon right clicking, not in real time, but I can live with that.

As an additional observation, I experimented with those lines a bit and I guess the @keydown modifier is just required to be there in some capacity for the KeyDown evaluator function to work. Because I notice the button will correctly update with the Ctrl key's status (via the evaluator) even if the 2nd line is changed to something like:
@keydown:shift

Edit: Hm looks like it does only seem to work for toolbar buttons. I tried it for buttons in a menu list and it doesn't seem to work in real time for those either -- it decides at time of clicking the menu. I wonder if the real time behavior can be achieved for these too?