[self-interest] Using the arrow keys to move around the world
mail at russell-allen.com
Sat Jul 25 00:58:24 UTC 2009
Have you tried using the scroller on your mouse/trackpad? This should
scroll the entire world up and down. On the mac it also allows
scrolling left and right (using two fingers on my macbook trackpad)
On 22/07/2009, at 9:42 PM, Chris Double wrote:
> I can use a radarView to move around the world by pressing buttons -
> is there a way to enable moving around with the arrow keys?
> I did a quick hack and got something working using normal keys but I
> couldn't work out how to ask a key down event if it's one of the arrow
> keys. What I got working was to modify 'handleAndForward:To:' in the
> handMorph traits. I added code on the keydown check with something
> e metaIsDown && [ e keystrokes includes: 'j' ] ifTrue: [ world
> moveHand: self InWorldBy: -500 at 0. ^self. ]
> I repeated this for the four keys I wanted for up, down, left and
> right. Ideally I'd like to use the arrow keys though since I'm
> clashing with some of the editor meta keys.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Self-interest