Browser Keystrokes

Dick Middleton (dick@sqf.hp.com)
Thu, 10 Apr 1997 09:35:15 +0100

To subscribers of the xforms list from Dick Middleton <dick@sqf.hp.com> :

> > I want to receive keyboard events from a browser object (to use to index into
> > an alphabetic list). I'm having a little difficulty understanding what I
> > have to do to make the browser handle these events. Has anybody got an
> > example of something similar that I can copy?

> Sort of like the Mac file browsers?

I'm not familiar with Mac but I would guess so. The idea is if you have a
long list in alphabetical order one can get close to the desired entry
quickly by typing the first one or more letters of the entry.

xforms browser is good in that it allows you to pre-position the slider so
making this function quite easy - if only one could get the key events.

> Look at the manual section on Pre-emptive handlers (Chapter 27). You
> can grab the keyboard events with a Post Object handler and do what
> you want with them.

Unfortunately this doesn't work because the browser object doesn't generate
key events (so they can't be pre-emptied). My next step was to set the object
attribute "input" to true (so key events would be generated) using fl_add_NEW
but I can't get this to work either (I think because the object is not
initialized correctly). It is possible the example in 21.1 of the manual is
incomplete but I'm at the limit of my understanding here so I can't tell.

Dick

-------------------------- European Customer Support --------------------------
_
Dick Middleton / / Communications Measurement
HP Telnet: 313-2530 / /__ ______ Division
Phone: +44 131-331 7530 / __ / / ___ / South Queensferry
Fax: +44 131-331 7443 / / / / / /__/ / Scotland UK
email: dick@sqf.hp.com /_/ /_/ / _____/
/ / ( )
( ) /_/ ( )
( ) _______ ( )
( ) | . ~ ~ ~ ~~ .
. ~ ~ ~ ~~ . |
/O\
-------------------------------------( o )-------------------------------------
- I'd rather be soaring
_________________________________________________
To unsubscribe, send the message "unsubscribe" to
xforms-request@bob.usuf2.usuhs.mil or see
http://bob.usuf2.usuhs.mil/mailserv/xforms.html
Xforms Home Page: http://bragg.phys.uwm.edu/xforms
List Archive: http://bob.usuf2.usuhs.mil/mailserv/list-archives/xforms-archive/