| call SMG$CREATE_VIRTUAL_KEYBOARD to get a keyboard_id, then use it in a call
to SMG$READ_COMPOSED_LINE. This will read the line in and keep its own recall
buffer. If you create several virtual keyboards each will have its own recall
buffer, so recall can be made context dependent (TPU seems to do this)
You will also need to create a key table. Code example in Fortran follows
the form feed.
= Giles =
integer function READKB(promp,line,length,file)
c
character*(*) promp,line,file,oldfile*70
integer SMG$READ_COMPOSED_LINE,SMG$CREATE_VIRTUAL_KEYBOARD
data oldfile /' '/, id/0/
c
if(file.ne.oldfile) then
if(id.ne.0) then
call SMG$DELETE_VIRTUAL_KEYBOARD(id) ! ignore status
else
call SMG$CREATE_KEY_TABLE(idt) ! first time through
endif
iret=SMG$CREATE_VIRTUAL_KEYBOARD(id,file,,,20)
if(.not.iret) call LIB$SIGNAL(%VAL(iret))
oldfile=file
endif
READKB=SMG$READ_COMPOSED_LINE(id,idt,line,promp,length)
return
end
|