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

More
2 months 1 week ago - 2 months 1 week ago #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:
[code]loadusr -W hal_input -G Code Mercenaries KeyWarrior Combo O Commander
i tried
Code:
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.
Code:
loadusr -W hal_input virtual keyd keyboard
Code:
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",
Code:
loadusr -W hal_input "Code Mercenaries KeyWarrior Combo O Commander"
does NOT work..
Code:
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: 2 months 1 week ago by muddiver.

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

More
2 months 1 week ago #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
2 months 1 week ago #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
2 months 1 week ago - 2 months 1 week ago #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: 2 months 1 week ago by Aciera.

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

More
2 months 1 week ago #348969 by muddiver
Hi Aciera!

i solved it, my problem had several culprits.

1. I have a documentaion for my MPG, which told me which keys are generated. i don't know why, but for 3 buttons, the documentation was simply wrong..  While learning the keyd feature, i learned how to grab the sent keys...

2. With the right udev rules, i can load the "keyd virtual keyboard" into the hal-input.
Everything works fine now, 

3. I did not solve my problem that a few keys triggered the ui, i tried with -KRAL Option, no luck, but i remapped the keys with keyd, so ther is no interaction with the ui any more.

Thanks for your help!
I would say i start figuring out how to net the keys in the halui, i think i will need some help there, because all my buttons are push-buttons, with no lock in pressed-state.

Do you think it is helpful for other people how to handle keyd?
I can offer to write a small tutorial for this tool, but only it there are interested people around..

Greets, Tom

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

Time to create page: 0.230 seconds
Powered by Kunena Forum