var shift=0;
var caps=0;
function char(capa){
field = document.getElementById('keyword');
switch (capa){	
	case "back" : {var text_ch=field.value; field.value = text_ch.substr(0, (text_ch.length-1)); return;};
	case "caps" : caps= (caps==0) ? 1 : 0;
	case "shift" : {shift= (shift==1) ? 0 : 1; return;};
	default : {
	if (shift==0) field.value=field.value + capa
	else {
	var text_ch =""
	switch (capa){
		case "`" : text_ch="~"; break;
		case "1" : text_ch="!"; break;
		case "2" : text_ch="@"; break;
		case "3" : text_ch="#"; break;
		case "4" : text_ch="$"; break;
		case "5" : text_ch="%"; break;
		case "6" : text_ch="^"; break;
		case "7" : text_ch="&"; break;
		case "8" : text_ch="*"; break;
		case "9" : text_ch="("; break;
		case "0" : text_ch=")"; break;
		case "-" : text_ch="_"; break;
		case "=" : text_ch="+"; break;
		case ";" : text_ch=":"; break;
		case "é" : text_ch="É"; break;
		case "ö" : text_ch="Ö"; break;
		case "ó" : text_ch="Ó"; break;
		case "ê" : text_ch="Ê"; break;
		case "å" : text_ch="Å"; break;
		case "í" : text_ch="Í"; break;
		case "ã" : text_ch="Ã"; break;
		case "ø" : text_ch="Ø"; break;
		case "ù" : text_ch="Ù"; break;
		case "ç" : text_ch="Ç"; break;
		case "õ" : text_ch="Õ"; break;
		case "ú" : text_ch="Ú"; break;
		case "{" : text_ch="}"; break;
		case "ô" : text_ch="Ô"; break;
		case "û" : text_ch="Û"; break;
		case "â" : text_ch="Â"; break;
		case "à" : text_ch="À"; break;
		case "ï" : text_ch="Ï"; break;
		case "ð" : text_ch="Ð"; break;
		case "î" : text_ch="Î"; break;
		case "ë" : text_ch="Ë"; break;
		case "ä" : text_ch="Ä"; break;
		case "æ" : text_ch="Æ"; break;
		case "ý" : text_ch="Ý"; break;
		case "ÿ" : text_ch="ß"; break;
		case "÷" : text_ch="×"; break;
		case "ñ" : text_ch="Ñ"; break;
		case "ì" : text_ch="Ì"; break;
		case "è" : text_ch="È"; break;
		case "ò" : text_ch="Ò"; break;
		case "ü" : text_ch="Ü"; break;
		case "á" : text_ch="Á"; break;
		case "þ" : text_ch="Þ"; break;
		case "," : text_ch="."; break;
		case "<" : text_ch=">"; break;
		case "'" : text_ch='"'; break;
		case "]" : text_ch="["; break;
		case "/" : text_ch="?"; break;
		case "\\" : text_ch="|"; break;		
		default : text_ch=capa
	}
	field.value=field.value+text_ch;
	}
	shift = (caps==1) ? 1 : 0;
	}
	
};
}