USB Access in Wine (bidirectional)
by CVAlkan from LinuxQuestions.org on (#5F8Y5)
I've recently purchased a very nice Chinese mechanical keyboard, a Durgod K-320 Corona, an excellent mechanical keyboard which works just fine with Linux.
When used under Windows, a downloadable program called the Durgod Zeus Engine (DZE) can be used to reconfigure keys, create text blocks and macros for assignment to particular keys, and similar functionality; one can then download these to a shadow profile on the keyboard itself.
There are, to be sure, some oddities with the DZE software, but I've been able to assign a few things, download them to the K-320, move the keyboard to a Linux machine, and use the (Fn+F12) hot key combination, which causes the shadow profile to become active; a small LED on the keyboard is lit to indicate that the secondary profile is active, and the remapped keys work as advertised.
But I don't want to traipse over to a Windows machine every time I want to create a new macro or whatever, and such mapping cannot be done on the keyboard itself (unlike my Kinesis FreeStyle Edge, which I think sets the standard for how programmable keyboards ought to work, but that's another discussion).
So I attempted to run the DZE using Wine on my Linux Mint 20/Cinnamon 4.6.7/5.4 kernel, and have had no luck whatsoever. When the DZE is started on Windows, it automagically detects the model of the keyboard and displays the appropriate set of screens. Under Wine, the program doesn't seem to see the keyboard at all. Just to eb clear, if I run "wine64 uninstaller" from the terminal, the keyboard works normally.
So I trolled the web for some solutions or at least some hints and found the usual collection of undated postings, obviously outdated postings, and even "official" postings (such as the Wine site itself) whose advice refers to locations that don't exist on my machine or similar.
Several postings indicate that I need to be in either the sys or dialout groups for access to com ports in wine, so after confirming that these groups already existed, I ran:
Quote:
... and then, of course, rebooted. The DZE still could not see the keyboard.
So, if anyone has ideas, or a better understanding of Wine than I do (sadly, not a very high bar), here is what I've been able to locate so far:
Running lsusb shows the keyboard on the following line:
Quote:
Running ls -l from the ~/.wine/dosdevices lists links for:
Quote:
... as well as links from:
Quote:
... through
Quote:
There are no entries there (nor in /dev itself) similar to the ttyUSB* referred to in many posts.
My keyboard is at: /dev/usb/hiddev0
From the ~/.wine/dosdevices directory I removed the com1 link:
Quote:
... and added a new one to my keyboard's device.
Quote:
Still no luck.
Poking around further, I found something interesting when running xinput list, whose output is listed below:
Quote:
The Hoksi Durgod keyboard is listed on five lines, with separate entries for "System Control" and "Keyboard." This leads me to suspect that possibly I should be trying to connect the app to the "System Control" rather than the "Keyboard" but also leads me to the conclusion that I have no idea what I'm looking at and need some adult supervision. Concerning the line with "Hoksi Technology DURGOD Taurus K310 Mouse" I can confirm that I do not have a Durgod mouse, though I disconnected my USB mouse plug just in case my mouse was OEM'd from them; since the DZE permits assigning mouse key functions to keyboard keys, I'm guessing that mouse entry might have to do with that.
Unplugging the keyboard itself, and using the Kinesis standalone Number Pad (which I'm guessing is the Cypress Semiconductor HID Keypad and MOSART stuff) above to repeat the xinput command in the terminal, I get the following.
Quote:
In the /dev/input/by-id directory, my machine has:
Quote:
In the /dev/input/by-path directory, my machine has:
Quote:
As I said above, it's a great keyboard - built like a tank and a delight to type on, so it would be nice to use all of its capabilities, and I'd appreciate any assistance anyone can offer.
Frank


When used under Windows, a downloadable program called the Durgod Zeus Engine (DZE) can be used to reconfigure keys, create text blocks and macros for assignment to particular keys, and similar functionality; one can then download these to a shadow profile on the keyboard itself.
There are, to be sure, some oddities with the DZE software, but I've been able to assign a few things, download them to the K-320, move the keyboard to a Linux machine, and use the (Fn+F12) hot key combination, which causes the shadow profile to become active; a small LED on the keyboard is lit to indicate that the secondary profile is active, and the remapped keys work as advertised.
But I don't want to traipse over to a Windows machine every time I want to create a new macro or whatever, and such mapping cannot be done on the keyboard itself (unlike my Kinesis FreeStyle Edge, which I think sets the standard for how programmable keyboards ought to work, but that's another discussion).
So I attempted to run the DZE using Wine on my Linux Mint 20/Cinnamon 4.6.7/5.4 kernel, and have had no luck whatsoever. When the DZE is started on Windows, it automagically detects the model of the keyboard and displays the appropriate set of screens. Under Wine, the program doesn't seem to see the keyboard at all. Just to eb clear, if I run "wine64 uninstaller" from the terminal, the keyboard works normally.
So I trolled the web for some solutions or at least some hints and found the usual collection of undated postings, obviously outdated postings, and even "official" postings (such as the Wine site itself) whose advice refers to locations that don't exist on my machine or similar.
Several postings indicate that I need to be in either the sys or dialout groups for access to com ports in wine, so after confirming that these groups already existed, I ran:
Quote:
sudo usermod -a -G sys,dialout frank |
So, if anyone has ideas, or a better understanding of Wine than I do (sadly, not a very high bar), here is what I've been able to locate so far:
Running lsusb shows the keyboard on the following line:
Quote:
Bus 003 Device 004: ID 2f68:0082 Hoksi Technology DURGOD Taurus K320 |
Quote:
lrwxrwxrwx 1 frank frank 10 Mar 2 06:28 c: -> ../drive_c lrwxrwxrwx 1 frank frank 10 Mar 2 06:29 com1 -> /dev/ttyS0 lrwxrwxrwx 1 frank frank 8 Mar 2 06:28 d:: -> /dev/sr0 lrwxrwxrwx 1 frank frank 1 Mar 2 06:28 z: -> / |
Quote:
lrwxrwxrwx 1 frank frank 10 Mar 2 06:29 com1 -> /dev/ttyS0 |
Quote:
lrwxrwxrwx 1 frank frank 11 Mar 2 06:29 com32 -> /dev/ttyS31 |
My keyboard is at: /dev/usb/hiddev0
From the ~/.wine/dosdevices directory I removed the com1 link:
Quote:
rm -i com1 |
Quote:
ln -s /dev/usb/hiddev0 com1 |
Poking around further, I found something interesting when running xinput list, whose output is listed below:
Quote:
$ xinput list Virtual core pointer id=2[master pointer (3)] Virtual core XTEST pointer id=4[slave pointer (2)] Conexant Hybrid TV (cx231xx) MCE IR no TX (2040:b123)id=10[slave pointer (2)] MOSART Semi. 2.4G RF Keyboard & Mouse id=13[slave pointer (2)] MOSART Semi. 2.4G RF Keyboard & Mouse Consumer Controlid=14[slave pointer (2)] Hoksi Technology DURGOD Taurus K310 Consumer Controlid=18[slave pointer (2)] Hoksi Technology DURGOD Taurus K310 Mouseid=20[slave pointer (2)] Virtual core keyboard id=3[master keyboard (2)] Virtual core XTEST keyboard id=5[slave keyboard (3)] Power Button id=6[slave keyboard (3)] Video Bus id=7[slave keyboard (3)] Video Bus id=8[slave keyboard (3)] Power Button id=9[slave keyboard (3)] Cypress Semiconductor HID Keypad id=11[slave keyboard (3)] MOSART Semi. 2.4G RF Keyboard & Mouse id=12[slave keyboard (3)] MOSART Semi. 2.4G RF Keyboard & Mouse System Controlid=15[slave keyboard (3)] Hoksi Technology DURGOD Taurus K310 id=16[slave keyboard (3)] Hoksi Technology DURGOD Taurus K310 System Controlid=17[slave keyboard (3)] Hoksi Technology DURGOD Taurus K310 Keyboardid=19[slave keyboard (3)] Conexant Hybrid TV (cx231xx) MCE IR no TX (2040:b123)id=21[slave keyboard (3)] MOSART Semi. 2.4G RF Keyboard & Mouse Consumer Controlid=22[slave keyboard (3)] Hoksi Technology DURGOD Taurus K310 Consumer Controlid=23[slave keyboard (3)] |
Unplugging the keyboard itself, and using the Kinesis standalone Number Pad (which I'm guessing is the Cypress Semiconductor HID Keypad and MOSART stuff) above to repeat the xinput command in the terminal, I get the following.
Quote:
$ sudo xinput list Virtual core pointer id=2[master pointer (3)] Virtual core XTEST pointer id=4[slave pointer (2)] Conexant Hybrid TV (cx231xx) MCE IR no TX (2040:b123)id=10[slave pointer (2)] MOSART Semi. 2.4G RF Keyboard & Mouse Consumer Controlid=13[slave pointer (2)] MOSART Semi. 2.4G RF Keyboard & Mouse id=15[slave pointer (2)] Virtual core keyboard id=3[master keyboard (2)] Virtual core XTEST keyboard id=5[slave keyboard (3)] Power Button id=6[slave keyboard (3)] Video Bus id=7[slave keyboard (3)] Video Bus id=8[slave keyboard (3)] Power Button id=9[slave keyboard (3)] Cypress Semiconductor HID Keypad id=11[slave keyboard (3)] Conexant Hybrid TV (cx231xx) MCE IR no TX (2040:b123)id=21[slave keyboard (3)] MOSART Semi. 2.4G RF Keyboard & Mouse id=12[slave keyboard (3)] MOSART Semi. 2.4G RF Keyboard & Mouse Consumer Controlid=14[slave keyboard (3)] MOSART Semi. 2.4G RF Keyboard & Mouse System Controlid=22[slave keyboard (3)] |
Quote:
$ ls -l total 0 lrwxrwxrwx 1 root root 9 Mar 12 09:45 usb-Cypress_Semiconductor_HID_Keypad-event-kbd -> ../event9 lrwxrwxrwx 1 root root 10 Mar 12 09:45 usb-Hauppauge_Hauppauge_Device_4036205519-event-ir -> ../event15 lrwxrwxrwx 1 root root 9 Mar 12 10:07 usb-Hoksi_Technology_DURGOD_Taurus_K320-event-if01 -> ../event5 lrwxrwxrwx 1 root root 9 Mar 12 10:07 usb-Hoksi_Technology_DURGOD_Taurus_K320-event-kbd -> ../event4 lrwxrwxrwx 1 root root 9 Mar 12 10:07 usb-Hoksi_Technology_DURGOD_Taurus_K320-if01-event-mouse -> ../event8 lrwxrwxrwx 1 root root 9 Mar 12 10:07 usb-Hoksi_Technology_DURGOD_Taurus_K320-if01-mouse -> ../mouse0 lrwxrwxrwx 1 root root 10 Mar 12 09:59 usb-MOSART_Semi._2.4G_RF_Keyboard___Mouse-event-if01 -> ../event14 lrwxrwxrwx 1 root root 10 Mar 12 09:59 usb-MOSART_Semi._2.4G_RF_Keyboard___Mouse-event-kbd -> ../event10 lrwxrwxrwx 1 root root 10 Mar 12 09:59 usb-MOSART_Semi._2.4G_RF_Keyboard___Mouse-if01-event-mouse -> ../event11 lrwxrwxrwx 1 root root 9 Mar 12 09:59 usb-MOSART_Semi._2.4G_RF_Keyboard___Mouse-if01-mouse -> ../mouse1 |
Quote:
$ ls -l total 0 lrwxrwxrwx 1 root root 10 Mar 12 09:45 pci-0000:09:00.3-usb-0:2:1.0-event-ir -> ../event15 lrwxrwxrwx 1 root root 9 Mar 12 09:45 pci-0000:09:00.3-usb-0:3.2:1.0-event-kbd -> ../event9 lrwxrwxrwx 1 root root 10 Mar 12 09:59 pci-0000:09:00.3-usb-0:3.3:1.0-event-kbd -> ../event10 lrwxrwxrwx 1 root root 10 Mar 12 09:59 pci-0000:09:00.3-usb-0:3.3:1.1-event -> ../event14 lrwxrwxrwx 1 root root 10 Mar 12 09:59 pci-0000:09:00.3-usb-0:3.3:1.1-event-mouse -> ../event11 lrwxrwxrwx 1 root root 9 Mar 12 09:59 pci-0000:09:00.3-usb-0:3.3:1.1-mouse -> ../mouse1 lrwxrwxrwx 1 root root 9 Mar 12 10:07 pci-0000:09:00.3-usb-0:4:1.0-event-kbd -> ../event4 lrwxrwxrwx 1 root root 9 Mar 12 10:07 pci-0000:09:00.3-usb-0:4:1.1-event -> ../event5 lrwxrwxrwx 1 root root 9 Mar 12 10:07 pci-0000:09:00.3-usb-0:4:1.1-event-mouse -> ../event8 lrwxrwxrwx 1 root root 9 Mar 12 10:07 pci-0000:09:00.3-usb-0:4:1.1-mouse -> ../mouse0 |
Frank