<div>I've typed in the keyspotting program in 6.7.1 of "A Tutorial to the Clean Object I/O Library" but do not get any responses for many of the special keys -- namely Function Keys (F1-F12), Del, Page Up, Page Down, arrow keys, end, and home keys. I get appropriate responses for the other special keys (Backspace, Enter, Escape), . I've tried it on Window Vista and XP with the same results.</div>
<div> </div>
<div>Thanks,</div>
<div> </div>
<div>Neil</div>
<div> </div>
<div>P.S. </div>
<div> </div>
<div>Here's the program </div>
<div> </div>
<div>module Keyspotting</div>
<div>import StdEnv, StdIO</div>
<div>Start :: *World -> *World<br>Start world <br> # (wid, world) = openId world<br> # window = Window "keyspotting" NilLS<br> [ WindowKeyboard (const True) Able (noLS1 (spotting wid))<br> , WindowId wid<br>
, WindowClose (noLS closeProcess)<br> ] <br> = startIO SDI Void (snd o openWindow Void window) [ProcessClose closeProcess] world<br> <br>where</div>
<div> spotting :: Id x (PSt .l) -> PSt .l | toString x<br> spotting wid x pst<br> = appPIO (setWindowLook wid True (False, look (toString x))) pst<br> <br> look :: String SelectState UpdateState *Picture -> *Picture<br>
look text _ {newFrame} picture<br> # picture = unfill newFrame picture<br> # (width, picture) = getPenFontStringWidth text picture<br> = drawAt {x=(w-width)/2, y=h/2} text picture<br> where<br> {w, h} = rectangleSize newFrame</div>