- Posts: 134
- Thank you received: 0
Keyboard Shortcuts in Gmoccapy
- abdulasis12
- Offline
- Premium Member
-
Less
More
2 years 5 months ago #300915
by abdulasis12
Replied by abdulasis12 on topic Keyboard Shortcuts in Gmoccapy
Hi ,
I try use : loadusr -W hal_input -K +KeyWarrior:0
in my hall, but debug file pop-up
***
Note: Using POSIX realtime
HAL: ERROR: duplicate component name 'iocontrol'
IOCONTROL: ERROR: hal_init() failed
can't initialize the HAL
Waiting for component 'hm2_eth' to become ready.....................
No input devices could be opened. This usually indicates a misconfigured
system. Please read the section 'PERMISSIONS AND UDEV' in the hal_input
manpage
./217-4x.hal:26: waitpid failed hal_input hal_input
./217-4x.hal:26: hal_input exited without becoming ready
1233
Stopping realtime threads
Unloading hal components
Note: Using POSIX realtime
*
hal_input <<
how to access permission. ?
or more other file to setup before use ?
FYI:
in hall line 26 is : loadusr -W hal_input -K +KeyWarrior:0
Thank you,
Asis
I try use : loadusr -W hal_input -K +KeyWarrior:0
in my hall, but debug file pop-up
***
Note: Using POSIX realtime
HAL: ERROR: duplicate component name 'iocontrol'
IOCONTROL: ERROR: hal_init() failed
can't initialize the HAL
Waiting for component 'hm2_eth' to become ready.....................
No input devices could be opened. This usually indicates a misconfigured
system. Please read the section 'PERMISSIONS AND UDEV' in the hal_input
manpage
./217-4x.hal:26: waitpid failed hal_input hal_input
./217-4x.hal:26: hal_input exited without becoming ready
1233
Stopping realtime threads
Unloading hal components
Note: Using POSIX realtime
*
hal_input <<
how to access permission. ?
or more other file to setup before use ?
FYI:
in hall line 26 is : loadusr -W hal_input -K +KeyWarrior:0
Thank you,
Asis
Please Log in to join the conversation.
2 years 5 months ago #300930
by HansU
Replied by HansU on topic Keyboard Shortcuts in Gmoccapy
A similar problem was reported here. Maybe Andys suggestion does help you?
forum.linuxcnc.org/24-hal-components/507...nnected-to-it#286170
forum.linuxcnc.org/24-hal-components/507...nnected-to-it#286170
Please Log in to join the conversation.
- abdulasis12
- Offline
- Premium Member
-
Less
More
- Posts: 134
- Thank you received: 0
2 years 5 months ago #301054
by abdulasis12
Replied by abdulasis12 on topic Keyboard Shortcuts in Gmoccapy
Thank you for reply MR. HansU
I try with your link of MR.andypugh .
I: Bus=0003 Vendor=1a2c Product=2124 Version=0110
N: Name="SEM USB Keyboard"
P: Phys=usb-0000:00:14.0-4/input0
S: Sysfs=/devices/pci0000:00/0000:00:14.0/usb2/2-4/2-4:1.0/0003:1A2C:2124.0001/input/input5
U: Uniq= H: Handlers=sysrq kbd leds event5
B: PROP=0 B: EV=120013
B: KEY=1000000000007 ff800000000007ff febeffdff3cfffff fffffffffffffffe
B: MSC=10 B: LED=7
I create file on /etc/udev/rules.d/
ATTR{idProduct}=="1a2c", ATTR{idVendor}=="2124", MODE="0660", GROUP="asis" #(I already create group name: asis )
I save, and reboot 1 time
When run linuxcnc , not work , just :hal:27: hal_input exited without becoming ready
Have any more for me set-up ?
Thankyou,
Asis
I try with your link of MR.andypugh .
I: Bus=0003 Vendor=1a2c Product=2124 Version=0110
N: Name="SEM USB Keyboard"
P: Phys=usb-0000:00:14.0-4/input0
S: Sysfs=/devices/pci0000:00/0000:00:14.0/usb2/2-4/2-4:1.0/0003:1A2C:2124.0001/input/input5
U: Uniq= H: Handlers=sysrq kbd leds event5
B: PROP=0 B: EV=120013
B: KEY=1000000000007 ff800000000007ff febeffdff3cfffff fffffffffffffffe
B: MSC=10 B: LED=7
I create file on /etc/udev/rules.d/
ATTR{idProduct}=="1a2c", ATTR{idVendor}=="2124", MODE="0660", GROUP="asis" #(I already create group name: asis )
I save, and reboot 1 time
When run linuxcnc , not work , just :hal:27: hal_input exited without becoming ready
Have any more for me set-up ?
Thankyou,
Asis
Attachment not found
Attachment not found
Attachment not found
Attachment not found
Attachment not found
Please Log in to join the conversation.
2 years 5 months ago #301058
by Aciera
Replied by Aciera on topic Keyboard Shortcuts in Gmoccapy
Not sure if this is related but you seem to have a preceding error:
HAL: ERROR: duplicate component name 'iocontrol'
if you comment out the line
loadusr -W hal_input -KRAL SEM
Do you still get the 'iocontrol' error?
HAL: ERROR: duplicate component name 'iocontrol'
if you comment out the line
loadusr -W hal_input -KRAL SEM
Do you still get the 'iocontrol' error?
Please Log in to join the conversation.
- abdulasis12
- Offline
- Premium Member
-
Less
More
- Posts: 134
- Thank you received: 0
2 years 5 months ago #301071
by abdulasis12
Replied by abdulasis12 on topic Keyboard Shortcuts in Gmoccapy
Thank you, for fast respond.
when comment (#)
can run linuxcnc
when comment (#)
can run linuxcnc
Attachment not found
Please Log in to join the conversation.
2 years 5 months ago #301609
by Talla
Replied by Talla on topic Keyboard Shortcuts in Gmoccapy
Hi
i test this on my Machine and i think your UDEV is wrong.
My Inputdevice:
I: Bus=0003 Vendor=04b3 Product=3025 Version=0110
N: Name="LITE-ON Technology USB NetVista Full Width Keyboard."
Add this to your UDEV File ---- change the id´s to yours.
ATTRS{idVendor}=="04b3", ATTRS{idProduct}=="3025", GROUP="plugdev" ,MODE="0666"
Then open a Terminal make the following commands... with your naming
sudo adduser cnc plugdev
sudo udevadm trigger
halrun
loadusr -W hal_input -KRAL LITE
after that i get this
note: name is 'LITE-ON Technology USB NetVista Full Width Keyboard.'
halcmd: Note: Using POSIX realtime
I get no more permission warnings.
Here a Video from my testing today.....
youtu.be/aqY-ZunRbHU
Peter
i test this on my Machine and i think your UDEV is wrong.
My Inputdevice:
I: Bus=0003 Vendor=04b3 Product=3025 Version=0110
N: Name="LITE-ON Technology USB NetVista Full Width Keyboard."
Add this to your UDEV File ---- change the id´s to yours.
ATTRS{idVendor}=="04b3", ATTRS{idProduct}=="3025", GROUP="plugdev" ,MODE="0666"
Then open a Terminal make the following commands... with your naming
sudo adduser cnc plugdev
sudo udevadm trigger
halrun
loadusr -W hal_input -KRAL LITE
after that i get this
note: name is 'LITE-ON Technology USB NetVista Full Width Keyboard.'
halcmd: Note: Using POSIX realtime
I get no more permission warnings.
Here a Video from my testing today.....
youtu.be/aqY-ZunRbHU
Peter
Please Log in to join the conversation.
1 year 7 months ago #324056
by PostavCNC
Replied by PostavCNC on topic Keyboard Shortcuts in Gmoccapy
Hi, there,
i am trying to make a keyboard shortcut to toggle between TURTLE and RABBIT jog mode. I think that the code should have look something like this:
if keyname == "r":
"some toggle event goes here"
return True
It is shown on in the def on_key_event section in the code attached from line 3052. Can you help me which event should I use to toggle jog modes?
i am trying to make a keyboard shortcut to toggle between TURTLE and RABBIT jog mode. I think that the code should have look something like this:
if keyname == "r":
"some toggle event goes here"
return True
It is shown on in the def on_key_event section in the code attached from line 3052. Can you help me which event should I use to toggle jog modes?
Please Log in to join the conversation.
1 year 7 months ago #324401
by HansU
Toggling does not really work without further changes, because it toggles the button twice then.
Adding two buttons is the simplest solution if that works for you.
Replied by HansU on topic Keyboard Shortcuts in Gmoccapy
Hi, there,
i am trying to make a keyboard shortcut to toggle between TURTLE and RABBIT jog mode. I think that the code should have look something like this:
if keyname == "r":
"some toggle event goes here"
return True
It is shown on in the def on_key_event section in the code attached from line 3052. Can you help me which event should I use to toggle jog modes?
Toggling does not really work without further changes, because it toggles the button twice then.
Adding two buttons is the simplest solution if that works for you.
Code:
if (keyname == "R" or keyname == "r"):
self.widgets.tbtn_turtle_jog.set_active(False)
if (keyname == "T" or keyname == "t"):
self.widgets.tbtn_turtle_jog.set_active(True)
Please Log in to join the conversation.
1 year 7 months ago #324403
by HansU
Replied by HansU on topic Keyboard Shortcuts in Gmoccapy
Weird that it works with a small modification in a minimal running example but not in gmoccapy:
Maybe you have some time to play around and figure it out if it is important for you.
Code:
import gi
gi.require_version("Gtk", "3.0")
from gi.repository import Gtk, Gdk
class ToggleButtonApp(Gtk.Window):
def __init__(self):
super().__init__(title="Toggle Button Example")
self.set_default_size(200, 100)
self.tbtn_turtle_jog = Gtk.ToggleButton(label="Button is OFF")
self.tbtn_turtle_jog.connect("toggled", self.on_chk_turtle_jog_toggled)
self.add(self.tbtn_turtle_jog)
self.connect("key-press-event", self.on_key_press)
def on_chk_turtle_jog_toggled(self, button):
if button.get_active():
button.set_label("Button is ON")
else:
button.set_label("Button is OFF")
def on_key_press(self, widget, event):
keyname = Gdk.keyval_name(event.keyval)
if keyname == "r" or keyname == "R":
self.tbtn_turtle_jog.set_active(not self.tbtn_turtle_jog.get_active())
return True # Stop further processing of the event
win = ToggleButtonApp()
win.connect("destroy", Gtk.main_quit)
win.show_all()
Gtk.main()
Maybe you have some time to play around and figure it out if it is important for you.
Please Log in to join the conversation.
Time to create page: 0.770 seconds
