Hi, i was trying to adapt the hcesar keyboard to the pt-pt portuguese layout, as we need to use many diacritics in our language, the layout available is a bit confusing to use on my keyboard, and most people that wiil use this keyboard will be from my country, so i found the concept here: Category:HCESAR keyboard layouts - Wikimedia Commons
(apple keyboard concept)
After playing around i thought it was good enough, here is my version:
However, if this one is different or improved you would be welcome to submit your keyboard to our repository under a different folder/filename. If it’s not too different we might consider merging your changes into the existing hcesar keyboard (since that one is considered experimental).
i kept the [ -] key on the same place of last version (old layout), kept the [ºª] on fist key as its already used in spanish, so its not a unusual location, and for this two keys be close (as they are next to each other in portuguese keyboard), also the minus sign now is on the same line as the plus sign. i tried to keep the  key on the first place but [ºª] is present on the first row on the old layout, and if [ºª] in before H, the key below it would be [-], and it would be the oposite of the portuguese layout, so not very intuitive, placing the [ºª] in firt row, makes it consistent with old layout, and logicaly more organized, as the [,;] and [.:] needs to be togetheter, the [_-] could be together with the , also its the last key, so now it have all keys, as a modern keyboard.
Yes, the á is typed be pressing the [´] dead key, the à pressing the Shift and the [´] key and next the letter. The ã and â, is similar, but using the [^~] key. There is also ä, but it works with pressing Altgr, instead of Shift first, at least on a native keyboard, it should work the same way.
This version of your keyboard layout does have working deadkeys for diacritics (at least it works on my keyboard). The two dots over the vowel is obtained by pressing either ALT key then + then the vowel. (This avoids the warnings about using LALT and RALT together with ALT).