There seems to be a bug when I press a double-key sequence for, for example, type an 'á' (ie. press the '´' key, release, press 'a' and release) the unicode value is correctly registered in the event queue but the mouse gets confined to the allegro window.
If I press the sequence again the mouse gets released so it seems that the grabbing is being toggled every time I press that kind of sequence keys.
The workaround I found is to call al_ungrab_mouse() every time I get a unicode event, but it is quite annoying and not optimal.
I'm using the allegro bundled in debian testing (I think it's 5.0.11-1), under plasma (KDE) with a Spanish keyboard layout and IBus for Japanese input (that, however, doesn't seem to work with allegro. I'll have to research about ibus).