Keyboard freezes in Leopard: possible link to changing batteries?

I'd been enjoying over a week of keyboard-freeze-free Leopard use until a few moments ago. Coincidentally, I also hadn't switched batteries in about over a week as I'd been too lazy to charge my second battery. A few moments ago though, I hot-swapped to the other battery after the first one ran out (once my MacBook Pro had gone to sleep) and I've just experienced two separate keyboard freeze-ups.

I'm going to go out on a limb here and suggest a link between changing batteries (possibly hot swapping) and the keyboard freezes in Leopard. It may not be the only trigger but it does appear to at least be one of the reasons.

Has anyone else noticed this?

Update: And it seems that a restart cures this. The reports on the web that clearning the PRAM fixes the issue may be an ad-hoc fallacy as clearing the PRAM involves a restart and it might be the latter that fixes things.

Update: Someone in this thread is also reporting that they see the keyboard freezing issue only after changing batteries. Also, someone else suggests that it might be a problem with the Finder capturing keystrokes (restarting the Finder reportedly resolves the issue for him).