Widget with modifier based text

Is it possible to have a widget show text based on whether a modifier key is down?

I want a touchbar widget to be multi purpose. When no modifier keys are down it should say “text0” and when tapped it will do named action “action0”

When the command key is down the text should be “text1” and when tapped it will do named “action1”

Is this possible?

You can configure multiple widgets that show /hide when specific modifiers are pressed, but currently there is no good way to change a specific widget in response to modifier keys. (This will soon become possible when I improve the key sequences feature)

I see. And here I was trying to write an Apple script that returns different strings based on which modifier key is down. So far I have haven’t had much luck getting it working.

Do you have a github Or issue tracker so I can watch the feature?

This forum is the issue tracker. I moved your post to the Feature Request category.

macos has a native accessbility keyboard. disable all the features on it except for modifier keys. its like an onscreen keyboard.

sorry ignore the spotify. im assuming youre using something like touche for touchpanel to be onscreen in whichcase the accessbility keyboard should be enough. you can rearrange and resize it to match the touchbar. you could do a script to reflect the results of that keyboard and mirror it on a physical touchbar. alternatively you can have the command from btt include an action to post a system message and hae the touchbar read that message/notification.
you can also have changes to the bar based on which hotkey is down such as colorcode etc.