Help needed for conversion of old ( and loved ) Mach3 MPG

More
16 Aug 2026 08:57 - 17 Aug 2026 17:45 #348789 by muddiver
Hi folks!

i try to get my loved MPG in action in Linuxcnc, but i struggle..

when i ask lsusb i get told its a:
ID 07c0:0115 Code Mercenaries Hard- und Software GmbH KeyWarrior Combo O Commander
when i ask cat /proc/bus/input/devices i get
[code]I: Bus=0003 Vendor=07c0 Product=0115 Version=0110
N: Name="Code Mercenaries KeyWarrior Combo O Commander"
P: Phys=usb-0000:2a:00.3-3.4.4/input0
S: Sysfs=/devices/pci0000:00/0000:00:08.1/0000:2a:00.3/usb3/3-3/3-3.4/3-3.4.4/3-3.4.4:1.0/0003:07C0:0115.0004/input/input13
U: Uniq=
H: Handlers=sysrq kbd event13 leds 
B: PROP=0
B: EV=120013
B: KEY=1000000000007 ff800000000007ff febeffdfffefffff fffffffffffffffe
B: MSC=10
B: LED=1f

I: Bus=0003 Vendor=07c0 Product=0115 Version=0110
N: Name="Code Mercenaries KeyWarrior Combo O Commander"
P: Phys=usb-0000:2a:00.3-3.4.4/input1
S: Sysfs=/devices/pci0000:00/0000:00:08.1/0000:2a:00.3/usb3/3-3/3-3.4/3-3.4.4/3-3.4.4:1.1/0003:07C0:0115.0005/input/input14
U: Uniq=
H: Handlers=mouse1 event14 
B: PROP=0
B: EV=17
B: KEY=70000 0 0 0 0
B: REL=3
B: MSC=10

when i run "halrun" and type in:
loadusr -W hal_input Code Mercenaries KeyWarrior Combo O Commander
The keys get loaded, but they get loaded 5 times!
I am told that the name for the device is "Code Mercenaries KeyWarrior Combo O Commander" ,
but the message also shows 5 times!

What am i doing wrong?

Whats confusing to me too, is that i cannot use 
loadusr -W hal_input "Code Mercenaries KeyWarrior Combo O Commander" , that one won't work, only without " , its accepted.
As far as i know, you should always use " when there are blanks in a name / path.

Thanks in advance, Tom


 
[/code]
Attachments:
Last edit: 17 Aug 2026 17:45 by muddiver.

Please Log in or Create an account to join the conversation.

  • tommylight
  • tommylight's Avatar
  • Away
  • Moderator
  • Moderator
More
17 Aug 2026 03:41 #348801 by tommylight

Whats confusing to me too, is that i cannot use 
"loadusr -W hal_input Code Mercenaries KeyWarrior Combo O Commander" , that one won't work, only without " , its accepted.
As far as i know, you should always use " when there are blanks in a name / path.

Try:
loadusr -W hal_input "Code Mercenaries KeyWarrior Combo O Commander"

Please Log in or Create an account to join the conversation.

More
17 Aug 2026 17:44 #348818 by muddiver
Sorry, typo,
this is what i wrote.. 
loadusr -W hal_input "Code Mercenaries KeyWarrior Combo O Commander"

At least in halrun this is not going to work.. Am i right that what does not work in halrun will not work in the halfile?

Please Log in or Create an account to join the conversation.

More
17 Aug 2026 18:39 #348820 by muddiver
I do not really understand why,
but when i load the usb-mpg via Vendorkey+Productkey and -K option, all works fine.

Any disadvantages loading the keyboard via vendor/productkey and not via name?

Greets, Tom

Please Log in or Create an account to join the conversation.

More
22 Aug 2026 14:53 #348913 by muddiver
Hi folks,

i tried remapping the keys on my usb-MPG with keyd, but i struggle importing them into the hal.

Is there a prefered way of remapping keys for linuxcnc and do you have a link to a turorial or a manual?

Thanks in advance,

Greets Tom

Please Log in or Create an account to join the conversation.

More
22 Aug 2026 15:18 #348914 by Aciera
Do you have the hal_input component working and the pins created?

Maybe show us what you have got and then tell us what is not working. Otherwise we're just guessing.

Please Log in or Create an account to join the conversation.

More
22 Aug 2026 15:59 - 22 Aug 2026 16:01 #348915 by muddiver
Hi Aciera, nice to meet you!

My Problem is: My USB-MPG sends weird keys, Alt /M , Alt / - , Alt / % , Alt / # , Alt/= , F10 , F11.
Alt / % sends Alt + Shift + 5 , which makes it "interesting" to grab...
F10 and F11 opens the menu and toggles between fullscreen and windowmode.

So, at first i have to somehow keep these keys from interacting with the UI of Linuxcnc, ONLY interacting with hal_input.
I tried 
[code]loadusr -W hal_input -G Code Mercenaries KeyWarrior Combo O Commander
i tried
loadusr -W hal_input -A Code Mercenaries KeyWarrior Combo O Commander
none of these stops interacting with my ui..

What i did so far, i grabbed the USB-name, and vendor and productkey of my USB-Davice.
I wrote a UDEV rule which worked after a bit of confusion.
i loaded the device in the halfile ( of the sim so far ) and i could see most of my keys turn yellow in the halshow.

So my first attempt ( asking the AI, which was not my best option when i think about it now ) was to remap the keys with keyd.
I wrote a default.conf to remap the keys. What happened?
The keys which send F10 and F11 do no longer affect ma ui! No toggling window to fullscreen.
But i struggled at importing the "virtual keyd keyboard" into LinuxCNC.
loadusr -W hal_input virtual keyd keyboard
doesNOT work, "no such device"
I would like to use " , but these don't work for me, i do not know why ( see above ) 

One of my Problems:
I cannot load the keyboard via "name",
loadusr -W hal_input "Code Mercenaries KeyWarrior Combo O Commander"
does NOT work..
loadusr -W hal_input Code Mercenaries KeyWarrior Combo O Commander
works! As far as i know, i should use " whenever i have blanks in a filename / path / device.
I do not really understand why..

Thanks for any help in advance!
Honestly, i tried with AI-support, but this only calmed my mood because our jobs are safe for a looong time, so crappy answers..
Greets, Tom
Last edit: 22 Aug 2026 16:01 by muddiver.

Please Log in or Create an account to join the conversation.

More
22 Aug 2026 18:04 #348920 by Aciera

and i could see most of my keys turn yellow in the halshow.


Not sure I understand you correctly but it you have the pins in your hal reacting to your pendant keys wouldn't you just need to connect those hal pins to the respective pins of your gui?

Please Log in or Create an account to join the conversation.

More
23 Aug 2026 07:16 #348931 by muddiver
Hi Aciera,

you are right, but i see almost any buttons of my keyboard, i can not figure out how tog et the rest of them.
Another problem is, when i press Button "Z", the menu in LinuxCNC shows up, because "Z" sends "F10" ( or was it F11 ) which brings up the menu. Another Axisbutton toggles between Windowmode and fullscreen of LinuxCNC UI, which is not what i would call a reliable system..
So i think i have to remap the keys send by my keyboard, or is there another solution to this problem i don't know about?

Thanks in advance, Greet, Tom

Please Log in or Create an account to join the conversation.

More
23 Aug 2026 16:52 - 23 Aug 2026 16:54 #348940 by Aciera

you are right, but i see almost any buttons of my keyboard,


Sounds like you are not acually grabbing the right device.
What GUI are you using? Gmoccapy offers the option to disable keyboard shortcuts.
Last edit: 23 Aug 2026 16:54 by Aciera.

Please Log in or Create an account to join the conversation.

Time to create page: 0.085 seconds
Powered by Kunena Forum