[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- Subject: Keyboard events
- From: dsreyn(at)ll.mit.edu (Doug Reynolds)
- Date: Fri, 28 Jul 2000 14:14:49 GMT
- Newsgroups: comp.lang.idl-pvwave
- Organization: MIT Lincoln Laboratory
- Sender: reynolds(at)bell (Doug Reynolds)
- Xref: news.doit.wisc.edu comp.lang.idl-pvwave:20471
I'm in the process of writing a new application, and several of the likely
users have requested that I allow various keyboard "shortcuts", as an
alternative to clicking on various controls with the mouse. For example,
we will need to define a region in an image that will be zoomed in a
separate draw window, and it would be nice to be able to use arrow keys
to position and resize the zoom region.
I've never tried to do this before in IDL (previously I've been content
to handle mouse events), so I went looking through the manuals to figure
out how to do it. Unfortunately, the event handling routines seem to be
limited to mouse and focus events. The closest thing I could find was the
get_kbrd function; someone here suggested putting a call to get_kbrd in
the event handling function. However, it would seem that this would cause
keyboard events to queue up, unprocessed, until the user wiggled the mouse.
In other words, it doesn't seem to be quite what I need.
Is there something in the documentation that I have overlooked? Any ideas
would be most appreciated.