how make arrow key movement in scratch code example

Example: how to make scratch move with arrow keys

up
when flag clicked(events)
forever(events)
if then(events)
key up arrow pressed(sensing)
drag key up arrow pressed into if then 
chang y by 5(motion)
down
when flag clicked(events)
forever(events)
if then(events)
key down arrow pressed(sensing)
drag key down arrow pressed into if then 
chang y by -5(motion)
right
when flag clicked(events)
forever(events)
if then(events)
key right arrow pressed(sensing)
drag key right arrow pressed into if then 
chang x by 5(motion)
left
when flag clicked(events)
forever(events)
if then(events)
key left arrow pressed(sensing)
drag key left arrow pressed into if then 
chang x by -5(motion)

Tags:

Misc Example