- Posts: 33
- Thank you received: 0
gmoccapy virtual button mapping (solved)
- centreline
- Topic Author
- Offline
- Junior Member
-
Less
More
7 years 1 month ago #146715
by centreline
gmoccapy virtual button mapping (solved) was created by centreline
Hi, I have gmoccapy on my cnc mill, and I've added a row of physical hardware buttons below the screen because my touchscreen is getting inconsistent with age, but these are not wired into inputs on a card, instead being connected to a keyboard processor (I'm out of hardware inputs to use).
So for leftmost hardware button returns a "a", next "b" etc (In fact I can reprogram the key returned for each button)
How can I tell gmoccapy that a keypress of the "a" key on my keyboard represents a keypress of the gmoccapy.h-button-0?
So for leftmost hardware button returns a "a", next "b" etc (In fact I can reprogram the key returned for each button)
How can I tell gmoccapy that a keypress of the "a" key on my keyboard represents a keypress of the gmoccapy.h-button-0?
Please Log in to join the conversation.
7 years 1 month ago #146728
by newbynobi
Replied by newbynobi on topic virtual button mapping
You will need to use hal_input for that purpose, for a KeyWarrior the part would look like this:
Does this help?
Norbert
Code:
# my keys in this example are
# button-0 input.0.key-a
# button-1 input.0.key-b
loadusr -W hal_input -K +KeyWarrior:0
net button-0 gmoccapy.h-button-0 <= input.0.key-a
net button-1 gmoccapy.h-button-1 <= input.0.key-b
Norbert
Please Log in to join the conversation.
- centreline
- Topic Author
- Offline
- Junior Member
-
Less
More
- Posts: 33
- Thank you received: 0
7 years 1 month ago #146769
by centreline
Replied by centreline on topic virtual button mapping
Thanks Norbert for the speedy response,
it makes sense reading it but I'll try it on the machine tomorrow.
it makes sense reading it but I'll try it on the machine tomorrow.
Please Log in to join the conversation.
- centreline
- Topic Author
- Offline
- Junior Member
-
Less
More
- Posts: 33
- Thank you received: 0
7 years 4 weeks ago #146799
by centreline
Replied by centreline on topic virtual button mapping
it works perfectly once I had worked out it needed to be in custom_postgui.hal because those pins don't exist until the gui is operation. Obvious now I type it 
I've connected the physical knee/quill jogging joysticks to key inputs on the 3TR keyboard and mapped the keys in the same way and everything is working again perfectly thanks.
I've connected the physical knee/quill jogging joysticks to key inputs on the 3TR keyboard and mapped the keys in the same way and everything is working again perfectly thanks.
Please Log in to join the conversation.
Time to create page: 5.050 seconds
