Use only the keypad with .1 Enter for 0.100 .75 Enter for 0.750 and 50 Enter for 50.000 ... etc.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="generator" content="PSPad editor, www.pspad.com">
<title></title>
<style type="text/css">
input {width:400px;}
</style>
</head>
<body>
<label for=lsr>Quantity field <input id="txt" type="text" value="" onkeyup="entry(event)"></label>
<script type="text/javascript">
/*
0.100 0.150 0.200 0.250 0.500 0.750 1.000 1.250 1.500 1.750 2.000
3.000 4.000 5.000 6.000 7.000 8.000 9.000 10.000 15.000 20.000 30.000
50.000 100.000 500.000 1000.000
*/
document.getElementById('txt').onkeyup=function(e){
var e=e?e:window.event,k=e.keyCode; //alert(k)
[COLOR="#0000FF"]// Authorized keys : Enter, space, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, and .[/COLOR]
keys={13:1,32:1,96:1,97:1,98:1,99:1,100:1,101:1,102:103,104:1,105:106,110:1}
var str=document.getElementById('txt'),previousEnt,lastEnt;
[COLOR="#0000FF"]// Remove non authorized entries [/COLOR]
if (!keys[k]) {str.value=str.value.replace(/[^\d\.\s]+/g,'');return;}
[COLOR="#0000FF"]// Enter : Format the last Entry [/COLOR]
if (k==13){(" "+str.value).replace(/(.*)\s+([^\s]+)$/,function(a,b,c){previousEnt=b.substr(1);lastEnt=c});
str.value=previousEnt+' '+(+lastEnt).toFixed(3)+' ';}
}
document.getElementById('txt').focus();
</script>
</body>
</html>
NB : Add a 8:1, at the beginning of the authorized keys to allows backspace for corrections