How to have dead keys working with an USB keyboard? I've connected to my phone a desktop USB keyboard using an OTG connector. Everything works fine, unfortunately I  can't produce accented letters like áéíãê. 

When I type an accent, like `'^, another symbol prints. I expected the behavior of a dead key, followed with the accented letter. 

The keyboard has a Brazilian ABNT layout. I tested it with Google Gboard and Samsung standard keyboard. Tested with languages English international and Brazilian Portuguese.
I wanted to avoid non-free software and found AnySoftKeyboard available thru F-Droid is able to handle dead keys too. Works well!