0

HTML5 USB Input

Is it possible to capture USB keyboard events using document.onkeypress?

(if not possible, how would you suggest capturing USB Keyboard and Barcode Scanner Input to use on a Javascript Variable on a HTML5 page?)

5 comments

  • 0
    Avatar
    Lyndon

    You can use javascript to read and write to variables on the unit. So, you can use javascript to do the usb keyboard capture, and then lookup existing variables and store them on the player. 

  • 0
    Avatar
    Felipe Budinich

    In order to troubleshoot my presentation:
    - I tested my input devices: several keyboards, and a couple of different models of usb barcode scanners, using the A USB port and the B USB Port. All of them properly fire events that I create with Bright Author:

    - I tested using a USB event to transition between states, and they are working properly (using <any> and using "1" as the specified input)

    - I tested using a Keyboard event to transition between states, and they are working properly (using <any> and using "1" as the specified input)

    For some reason, keyboards and barcode scanners are not working on the BrightSign HTML5 State, I attached an example webpage that works properly on the browser but doesn't work on the BrightSign (using a XD 1230).

  • 0
    Avatar
    Alex

    The webpage works well on my XD device. You need to connect a mouse or touchscreen to the unit, click on the screen, then enter numbers using a keyboard. I've tested with BrightAuthor 3.7.0.39 and firmware 4.7.122.

  • 1
    Avatar
    Felipe Budinich

    It does work if you click the screen first, but I need to do it without using a mouse:

    1.- I tried to emulate the behavior using document.getElementById("element").focus (it doesn't work).
    2.- I tried to emulate the behavior simulating a mouse click, like this: http://stackoverflow.com/questions/6157929/how-to-simulate-mouse-click-using-javascript (it doesn't work)

    Is it possible to do so without clicking or touching the screen? (people will interact with the XD using a Barcode Scanner)

  • 0
    Avatar
    Sarah German

    Same question here. Felipe, if you ever happen to see this... did you get this to work?

Please sign in to leave a comment.