I want to trap the pageup/pagedown key for jsgrid, but it appears that it does
not pass 'key' event, only 'click' 'rclick' and 'mark' events are generated.
mark
mark
click
mark
click
mark
rclick
How to trap the pageup/pagedown key in this case?
NB. ========================================
load 'jsgrid'
TT=: 0 : 0
pc tt closeok;
xywh 0 0 255 100;cc g isigraph;
pas 6 6;pcenter;
rem form end;
)
tt_run=: 3 : 0
wd TT
NB. initialize form here
wd 'pshow;'
grid=: '' conew 'jsgrid'
font=. '"Lucida Console" 10'
show__grid ('HDRFONT' ; 'CELLFONTS' ; 'CELLDATA' ; 'GRIDID' ; 'HDRCOL' ;
'COLWIDTH' ; 'CELLALIGN' ; 'COLAUTOFIT' ; 'COLSCALE' ; 'HDRCOLALIGN' ;
'GRIDSORT') ,. font ; (,<font) ; (40 1$<("0) i.100) ; 'g' ; (<'abc') ; 100 ; 0 ;
0 ; 0 ; 1 ; 0
''
)
tt_close=: 3 : 0
wd'pclose'
)
g_gridhandler=: 3 : 0
smoutput y
if. y -: 'key' do.
select. a.i.{.Char__grid
case. 16 do.
smoutput 'page up'
case. 17 do.
smoutput 'page down'
end.
end.
1
)
NB. ========================================
--
regards,
bill
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm