[Jprogramming] sysdata in the isigraph char event
Henry Rich
HenryHRich at nc.rr.com
Mon Jun 4 06:57:32 HKT 2007
I saw that in grid... there's a file
system\packages\graphics\vkeys.ijs
that has a bunch of key definitions: should that be treated
as the definitive source?
If so, it may need some work. It seems to have some non-UTF-8
definitions, and PAGEUP and PAGEDOWN show up as SHIFT and NEXT.
Henry Rich
> -----Original Message-----
> From: programming-bounces at jsoftware.com
> [mailto:programming-bounces at jsoftware.com] On Behalf Of Chris Burke
> Sent: Sunday, June 03, 2007 6:42 PM
> To: Programming forum
> Subject: Re: [Jprogramming] sysdata in the isigraph char event
>
> bill lam wrote:
> > test_pic_char=: 3 : 0
> > if. sysdata -: ,21{a. do.
> > wd 'setxywh pic 0 0 150 150'
> > end.
>
> As Bill points out, it is easiest to use the numeric index of the
> character, rather than the character itself - this is why it is
> documented as numeric indices.
>
> To make this readable, define a list of the keyboard events
> you want to
> monitor, and use a select statement, as below:
>
> kbLEFT=: 20
> kbUP=: 21
> kbRIGHT=: 22
> kbDOWN=: 23
>
> test_pic_char=: 3 : 0
> select. a.i.{.sysdata
> case. kbLEFT do. ...
> case. kbUP do. ...
> ...
> )
>
> For example, see this used in grid:
>
> load 'grid'
> 'kb' nl_jzgrid_ 0
> keyx_jzgrid_
>
> ----------------------------------------------------------------------
> For information about J forums see
> http://www.jsoftware.com/forums.htm
More information about the Programming
mailing list