on start up load two brightness values
sort(current,other as largest,smallest)  (if this step is ommitted, bright/dim preserved over shutdown)

hold_dim := (current < other); will be false unless above step is ommitted
apply(current)

action of the key is strictly a toggle
{
  swap(current,other);
  hold_dim := (current < other);
  apply(current)
}

if adjusting 'current' leaves it < 'other' this implies setting hold_dim
if adjusting 'current' leaves it >= 'other' this implies clearing hold_dim

upcall go dim

upcall unblank
{
  if hold_dim 
    sort(current,other as smallest,largest)
  else
    sort(current,other as largest,smallest)
  endif
  apply(current)
}