for block code (i.e: code.org) you can use a if statement.
if: arrow key press else if: Img.of.arrow clicked then: move to page to ... etc