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