Now try the following code and post a screenshot, please:
screen (640,480,32,"Colorkeytest on Haiku")
cls()
colourkey (102,49,113)
test1 = createimage (64,64)
startimagedraw (test1)
colour (102,49,113)
fillbox (0,0,64,64)
colour (255,255,0)
fillcircle (32,32,20)
stopimagedraw()
colourkey (202,49,113)
test2 = createimage (64,64)
startimagedraw (test2)
colour (202,49,113)
fillbox (0,0,64,64)
colour (255,255,0)
fillcircle (32,32,20)
stopimagedraw()
putimage (200,200,test1)
putimage (100,100,test2)
sync()
key=inkey()
closewindow()
(Actually you should only see two yellow circles on a black background ...)