Subscribe Bookmark RSS Feed

Trapping the cursor up/down keys

I've asked about something very similar to this before (http://communities.sas.com/message/38910#38910), but I now have a slightly different problem which I can't see how to tackle.  I have a window which displays a customized chart containing maybe 20 to 30 labels, which have been placed on the chart using an assortment of text(center justified, {..., ...}, "bla bla") commands - all very simple stuff.  I've also written in the functionality for the user to move the labels around manually on that chart by using the mousetrap function - again, not hard to do.  What I want to do now is to incorporate the ability to hop from label to label in sequence by using the cursor up and down keys - in much the same way that it's possible to select and move labels on an Excel graph.  Can that be done?  And if so, how do I set about scripting it?

Many thanks for any suggestions received.

David

1 REPLY
David_Burnham

Super User

Joined:

Jul 13, 2011

David

I don't know any way of doing this.  The closest method for trapping of keyboard keys would be to use the functions IS ALT(), IS CONTROL() and IS SHIFT().  These work in conjunction with the Mousetrap function, and still require a mouse click e.g. left click to go to next label, control+left click to go to previous label

Dave

-Dave