Here is an example of a script you could put in the Script Action in the Keyboard mapping menu.
This will increment the widget named Counter1 by 3..
`
dim widget as xpCounterWidget
engine.GetWidgetByName("Counter1", widget)
widget.Value = widget.Value + 3
`
#XPression