That is indeed an annoying behavior and it should update states on its own. In the meantime, you must check for the keys to be cleared before you open the message box (causing a slight delay until the keys are released):
do
if GetRawKeyState(17) and GetRawKeyPressed(asc("O"))
LoadModel()
endif
Print( "Press control+O for the message dialog")
Print( "Control="+str(GetRawKeyState(17)) )
Print( "O="+str(GetRawKeyState(asc("O"))) )
Sync()
loop
function LoadModel()
v as string
i as integer
k as integer
repeat
Sync()
until GetRawKeyState(17)=0 and GetRawKeyPressed(asc("O"))=0
Message("This is a message")
sync()
endfunction