Can you determine what USB HID code(s) the scanner is sending for that? (Perhaps using wireshark, or usbmon on linux, …) Some years ago I worked on ChromeOS keyboard input, and I can probably tell you right away what it'd do with it. Basically, is the USB code in https://source.chromium.org/chromium/chromium/src/+/main:ui/...