alias test { window -ae @test }
on *:KEYUP:@test:*: {
if (($editbox($target).selstart == $editbox($target).selend) && (($keyval > 40) || ($istok(8 32,$keyval,32)))) {
set -e %trailingspace $iif(($keyval == 32),1,0)
}
}
on *:INPUT:@test: {
echo $target input of "on input": $+([,$1-,])
editbox $iif((%trailingspace),-p) $target $1-
echo $target input "out of editbox": $+([,$editbox($target),])
}