Absolute to Keystroke

That’s all working great now, thought I would have a look at another use.
Trying to program so that for a rising midi value it outputs one keystroke and for falling value another keystroke.
I’ve got the basics working but can’t fix the translation.
Any pointers?

See this post.

And within the post above, this project file.

Steve Caldwell