Hi,
Is there a usb hidapi sample code for nrf52840 somewhere?
I know that there is a sample code of usbd_cdc_acm.
Using the HIDAPI library link below , It will be beneficial if the device is recognized as Vendor-Defined HID devices.
It is no longer need a device driver.
In addition, It is not have to deal with changing port numbers.
http://www.signal11.us/oss/hidapi/