F8 and F9 (and maybe F10) are shortcut keys for jqt.
The script I am developing around shader.ijs uses F10 to start and stop a
timer but does not work well for me. I have constructed the shortened
script below to demonstrate the problem.

In the demonstration the usual keys perform correctly and the verb
`a_g_char` echoes their keypresses in any situation when the control/window
"a" is in focus. No problems here.

Also in the demonstration F6 and F7 echo their keypresses in any situation
when the control/window "a" is in focus.

But F10 (and F8 and F9) needs special attention. In order for F10 to work
in the desired manner, first the Terminal window must be brought into focus
AND THEN the "a" window must be in focus. Only then can ALL the keys avoid
shortcut behavior.

This detour of additional refocusing has to be avoided, please.

NB. [I have commented out the "requirements" below to
NB. make them noticeable, but they are not used here,
NB. afaik.]

NB. require 'gl2'
NB. coinsert 'jgl2'
NB. require 'gles'
NB. coinsert 'jgles'
NB. require '~addons/ide/qt/opengl.ijs'
NB. coinsert 'qtopengl'

STOP=: 0
TN=: 1

A=: 0 : 0
pc a;
minwh 300 300;cc g opengl flush;
rem form end;
)

a_run=: 3 : 0
wd A
HD=: ".wd'qhwndc g'
wd 'pshow'
)

a_g_char=: 3 : 0
if. 0=#sysdata do. return. end.
smoutput k=. 0{sysdata

)

a_f6_fkey=: 3 : 0
smoutput 'F6';TN
TN=: TN-1
)

a_f7_fkey=: 3 : 0
smoutput 'F7';TN
TN=: TN+1
)

a_f10_fkey=: 3 : 0
smoutput 'STOP';STOP=: -.STOP
)

a_cancel=: a_close
a_close=: 3 : 0
STOP=: 0
wd 'pclose'
)
a_run''




   JVERSION
Engine: j807/j64/darwin
Release-c: commercial/2019-02-24T10:50:40
Library: 8.07.26
Qt IDE: 1.7.9/5.9.7
Platform: Darwin 64
Installer: J807 install
InstallPath: /users/brian/j64-807
Contact: www.jsoftware.com

-- 
(B=)
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to