Post Reply 
Reading USBRecv Problem
10-12-2023, 09:52 PM (This post was last modified: 10-12-2023 10:20 PM by toml_12953.)
Post: #3
RE: Reading USBRecv Problem
(10-12-2023 09:25 PM)gehakte_bits Wrote:  USBRecv() returns an (empty) list.
Don't stick that in 'A'

ie A:={1,2,3} won't work well..

I got the following working. Now all I need to do is make a lookup table to print the character typed rather than the HID list. This code will work no matter what keyboard you use. My first draft would only work with one brand/model.

Code:
EXPORT USBKBD()
BEGIN
LOCAL A:={}, B:={};

PRINT();

B:=USBOpen();

USBOpen(B(1,1),B(1,2));

WHILE 1 DO
  REPEAT
    A:=USBRecv;
  UNTIL length(A)>0 AND A(3)≠0
  PRINT(A);
END;

END;

Tom L
Cui bono?
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Reading USBRecv Problem - toml_12953 - 10-12-2023, 08:53 PM
RE: Reading USBRecv Problem - gehakte_bits - 10-12-2023, 09:25 PM
RE: Reading USBRecv Problem - toml_12953 - 10-12-2023 09:52 PM
RE: Reading USBRecv Problem - toml_12953 - 10-13-2023, 12:01 PM



User(s) browsing this thread: 1 Guest(s)