"Alt Gr" key not working in spanish layout


I have configured two CentOS images (download from OpenNebula Market): one with X and one without X. I have created separate templates. When I run two instances (one of each), I have notice that “Alt Gr” key is not working properly in spanish layout, so I can’t write “|” or “@”…

Could anyone help me?