Another approach is to buy a microprocessor based calculator kit such as this nice Arduino-compatible calculator kit rearrange the buttons and reprogram the chip accordingly.
Assembling this kit and reprogramming an Arduino-compatible calculator is certainly not rocket science and ought to be within the capabilities of someone with elementary soldering and programming skills.
The code is here ready to be hacked.
void decodeKeyPress()
{
tempINT = 0; // New Dec 20th
// KeyPad Layout
//
// Columns Rows
// 3 2 1 0
//
// 7 8 9 / 0
// 4 5 6 * 1
// 1 2 3 - 2
// . 0 = + 3
// Value mapping for decoding
// 12 8 4 0
// 13 9 5 1
// 14 10 6 2
// 15 11 7 3
// commandType => 1="+", 2="-", 3="/", 4="*", 5="=", 6="Clear"
for (i=0; i < 4; i++) // This decodes the Rows
{
if(bitRead(rawKeys, i))
//if(bitRead(rawKeyArray[column], i))
{
tempINT = i;
break;
}
}
currentKey = (column*4)+tempINT;
if(KeyDown[currentKey] == false)
{
KeyOK = true;
KeyDown[currentKey] = true;
switch (currentKey)
{
case 0:
KeyValue = 3;
commandFlag = true;
break;
case 1:
KeyValue = 4;
commandFlag = true;
break;
case 2:
KeyValue = 2;
commandFlag = true;
break;
case 3:
KeyValue = 1;
commandFlag = true;
break;
case 4:
KeyValue = 9;
break;
case 5:
KeyValue = 6;
break;
case 6:
KeyValue = 3;
break;
case 7:
KeyValue = 5;
commandFlag = true;
break;
case 8:
KeyValue = 8;
break;
case 9:
KeyValue = 5;
break;
case 10:
KeyValue = 2;
break;
case 11:
KeyValue = 11;
decimalFlag = true;
break;
case 12:
KeyValue = 7;
break;
case 13:
KeyValue = 4;
break;
case 14:
KeyValue = 1;
break;
case 15:
KeyValue = 0;
break;
// case 16: // Clear
// KeyValue = 6;
// commandFlag = true;
// break;
default: // Should never get here
KeyOK = false;
KeyValue = 0;
ErrorFlag = true;
ErrorCode = 4;
// KeyDown[currentKey] = false;
}
}
else
{
KeyOK = false; // Not a new key being pressed
}
}