|
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
//Event
handlers
|
|
|
public void keyAction(KeyEvent e)
|
{
|
|
|
char c = e.getKeyChar();
|
|
//handy
substitutions
|
|
|
if (c == '*') c = 'x';
|
|
else if (c == 'p') c = '+';
|
|
|
//enable the
Enter keys
|
|
else if (c == '\n' || c==141)
|
|
|
c = '=';
|
|
else if (c == 'c') c = '%';
|
|
|
st = c + "";
|
|
if (c == 'q') st = SQRT;
|
|
|
else st = c + "";
|
|
|
doAction(st);
|
|
|
}
|
|
|
|