Re: Help Needed with fgl_lastkey
Posted in 1996
In article <321e0f53.8622112@news.demon.co.uk>, Dave Brush <dave@djbrush.demon.co.uk> wrote: > >I've got a function which looks something like this > >FUNCTION ..... > DEFINE .... > > PROMPT "" FOR CHAR lc_char > ON KEY(LEFT,RIGHT, UP, DOWN, PREVPAGE . . . . . . etc > LET ln_key_no = fgl_lastkey() > END PROMPT > >This works fine except for the right cursor key, which isn't detected >until the visible display is cursored through. This works fine for me: =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= main define lc_char char(11), lkey integer while (1) prompt "prompt" for char lc_char on key ("left", "right", "up", "down") let lkey = fgl_lastkey() display "Last keystroke is ", lkey end prompt end while end main aland@aloss (318)-> fglgo d prompt (I hit up-arrow) Last keystroke is 2000 prompt (I hit down-arrow) Last keystroke is 2001 prompt (I hit left-arrow) Last keystroke is 2002 prompt (I hit right-arrow) Last keystroke is 2003 =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Sounds like you're hitting bug 15515: [ON KEY IN PROMPT IN WINDOW WILL NOT TRAP RIGHT ARROW FIRST PRESS ] Which was fixed in 4.15/6.03. >Smoke me a kipper, I'll be back for breakfast Red Dwarf? -- (c) 1996 Alan Denney aland@informix.com "According to records obtained by the New York Post, the New York City Transit Authority's worst bus driver, Leroy Goodwin, 56, is still driving despite 103 at-fault collisions over his 22-year career and even received a safe-driving award in 1986." (Chuck Shepherd's News of the Weird)