From cebfcdb7e8520821dcbdb2a773b9a655eb8b7fed Mon Sep 17 00:00:00 2001 From: Jonathan Sieber Date: Fri, 28 Apr 2017 20:35:31 +0200 Subject: [PATCH] Ignore space in Barcode Key Handler Fixes my use case of scrolling down to my name with space.... --- static/js/barcode.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/static/js/barcode.js b/static/js/barcode.js index 4a249db..3e28127 100644 --- a/static/js/barcode.js +++ b/static/js/barcode.js @@ -55,7 +55,7 @@ function barcodeKeyPress( event ) { // takes input from either keyboard or barco barcodeBuf = hideBarcode() } event.preventDefault() - } else if ( event.keyCode == 0 ) { // e.g. F-Keys are 112 to 123, A-Za-z0-9 all are 0. + } else if ( event.keyCode == 0 && key != " " ) { // e.g. F-Keys are 112 to 123, A-Za-z0-9 all are 0. console.log( "some input: " + barcodeBuf + "[" + key + "] <= {" + event.keyCode + "}" ) barcodeBuf += key showBarcode( barcodeBuf )