# Scroll with arrow keys

**URL:** <https://forum.kirupa.com/t/scroll-with-arrow-keys/290241>\
**Category:** Uncategorized\
**Created:** [June 11, 2009, 4:38pm UTC](https://forum.kirupa.com/t/scroll-with-arrow-keys/290241 "2009-06-11T16:38:41Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![alphaville](https://avatars.discourse-cdn.com/v4/letter/a/ee59a6/32.png) [@alphaville](https://forum.kirupa.com/u/alphaville)\
**Post date:** [June 11, 2009, 4:38pm UTC](https://forum.kirupa.com/t/scroll-with-arrow-keys/290241/1 "2009-06-11T16:38:41Z")

</div>

I need to control Kirupas content scroller by pressing up or down arrow keys. The code below is the up button from the Kirupas experiment. What should it be changed in code to fit for Up arrow key?

btnUp.onPress = function()  
{  
this.onEnterFrame = function()  
{  
dragger.\_y = Math.max(top, dragger.\_y-moveSpeed);  
updateContentPos();  
};
