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.

Thanks,

Neil

P.S.

Here's the program

module Keyspotting
import StdEnv, StdIO
Start :: *World -> *World
Start world
 # (wid, world) = openId world
 # window = Window "keyspotting" NilLS
  [ WindowKeyboard (const True) Able (noLS1 (spotting wid))
  , WindowId wid
  , WindowClose (noLS closeProcess)
  ]
 = startIO SDI Void (snd o openWindow Void window) [ProcessClose
closeProcess] world

where
 spotting :: Id x (PSt .l) -> PSt .l | toString x
 spotting wid x pst
  = appPIO (setWindowLook wid True (False, look (toString x))) pst

 look :: String SelectState UpdateState *Picture -> *Picture
 look text _ {newFrame} picture
  # picture = unfill newFrame picture
  # (width, picture) = getPenFontStringWidth text picture
  = drawAt {x=(w-width)/2, y=h/2} text picture
 where
  {w, h} = rectangleSize newFrame
_______________________________________________
clean-list mailing list
[email protected]
http://mailman.science.ru.nl/mailman/listinfo/clean-list

Reply via email to