I am wondering if anyone can give an idea of how I could connect to an event window.keyPress()in an Aurelia app. I want to capture the input of a barcode scanner and direct the scanned text to the appropriate input, based on what the scanned value is.
I tried to put window.addEventListener("keypress", HandleKeyInput, false)in activate()my view model, but these errors from the router application with "HandleKeyInput not defined", although I have this function in my view model.
I am wondering what is the right approach for this scenario to be relevant to Aurelia.
source
share