/*
* The following code is in case the option chosen is
* phonetic No manipulations required.
*/
} else {
PhoneticParseXML test1 = new PhoneticParseXML();
if (withShiftPressed >= 97 && withShiftPressed <= 122) {
inputChar = new Character((char) withShiftPressed)
.toString().toUpperCase();
} else {
inputChar = new Character((char) withShiftPressed)
.toString();
}
test1.getPhoneticPattern(inputChar);
System.out.println("Key Pressed with shift: "
+ withShiftPressed);
}
}
} else {
// Added flag reset in PhoneticParseXML
if (event.getVirtualKeyCode() == ENTERKEY) {
PhoneticParseXML.previousConsonantFlag = 0;
ParseXML.previousConsonantFlag = 0;
ParseXML.tamil99count = 0;
}
int tempKeyCode = 0;
if (PhoneticParseXML.PhoneticFlag == 0) {
ParseXML test = new ParseXML();
if (event.getVirtualKeyCode() <= 185) {
inputChar = new Character((char) event
.getVirtualKeyCode()).toString().toLowerCase();
} else {
switch (event.getVirtualKeyCode()) {
case 186:
tempKeyCode = 59;
break;
case 222:
tempKeyCode = 39;
break;
case 188:
tempKeyCode = 44;
break;
case 190:
tempKeyCode = 46;
break;
case 191:
tempKeyCode = 47;
break;
case 219:
tempKeyCode = 91;
break;
case 221:
tempKeyCode = 93;
break;
case 192:
tempKeyCode = 96;
break;
case 189:
tempKeyCode = 45;
break;
case 187:
tempKeyCode = 61;
break;
case 220:
tempKeyCode = 92;
break;
}
inputChar = new Character((char) tempKeyCode)
.toString();
}
test.getPattern(inputChar);
System.out.println("Key Pressed: "
+ event.getVirtualKeyCode());
} else {
PhoneticParseXML test1 = new PhoneticParseXML();
inputChar = new Character((char) event.getVirtualKeyCode())
.toString().toLowerCase();
test1.getPhoneticPattern(inputChar);
System.out.println("Key Pressed: "
+ event.getVirtualKeyCode());
}
}
}