KbCheck on new iMac with cordless keyboard

most of my psychophysical programmes have this little piece of code:

while 1
[KeyIsDown, ~, KeyCode]=KbCheck;
if KeyIsDown
break;
end
end

when i paste that little bit of code onto the command line, nothing
happens until i press a key. at that point, the matlab prompt (>>)
returns, as well as the letter i just typed.

EXCEPT ON MY NEW IMAC

there, i can see the letter i just typed, but the prompt never returns
until i do a ctrl-C.
ANY IDEAS?!?!?

thanks
j
PS i have read the documentation, so i have also tried
the above with KbCheck(-1). no dice.
GetKeyboardIndices returns 3, so i also tried KbCheck(3). still no dice.
just some further info:
plugging a usb keyboard into the imac doesn't seem to help. the usb
keyboard works fine, but it doesn't seem to be recognised by either
KbCheck or GetKeyboardIndices.
>> [keyboardIndices, productNames, allInfos]=GetKeyboardIndices()
returns only
keyboardIndices=3
productNames='Apple Wireless Keyboard' and
allInfos=[1x1 struct]

On 27/09/2013 12:59, "Solomon, Joshua" <J.A.Solomon@...> wrote:

> most of my psychophysical programmes have this little piece of code:
>
>while 1
>[KeyIsDown, ~, KeyCode]=KbCheck;
>if KeyIsDown
>break;
>end
>end
>
>when i paste that little bit of code onto the command line, nothing
>happens until i press a key. at that point, the matlab prompt (>>)
>returns, as well as the letter i just typed.
>
>EXCEPT ON MY NEW IMAC
>
>there, i can see the letter i just typed, but the prompt never returns
>until i do a ctrl-C.
>ANY IDEAS?!?!?
>
>thanks
>j
>PS i have read the documentation, so i have also tried
>the above with KbCheck(-1). no dice.
>GetKeyboardIndices returns 3, so i also tried KbCheck(3). still no dice.
>
>
>
>