- Posts: 50
- Thank you received: 1
Keyboard re-mapping (key binding)
14 years 11 months ago #14705
by ioiotutu
Replied by ioiotutu on topic Re:Keyboard re-mapping (key binding)
It is clear.
I'll try.
Thanks.
I'll try.
Thanks.
Please Log in or Create an account to join the conversation.
14 years 11 months ago #14712
by ioiotutu
Replied by ioiotutu on topic Re:Keyboard re-mapping (key binding)
Thanks,
with this code in axisrc all work fine:
#swap bind key
# Bind ( and ) to jog axis 3 (0=X, 1=Y, 2=Z, 3=A, 4=B, ...)
root_window.bind("<Up>", lambda e: jog_on(0, -get_jog_speed(0)))
root_window.bind("<Down>", lambda e: jog_on(0, +get_jog_speed(0)))
root_window.bind("<KeyRelease-Up>", lambda e: jog_off(0))
root_window.bind("<KeyRelease-Down>", lambda e: jog_off(0))
root_window.bind("<Left>", lambda e: jog_on(1, -get_jog_speed(1)))
root_window.bind("<Right>", lambda e: jog_on(1, +get_jog_speed(1)))
root_window.bind("<KeyRelease-Left>", lambda e: jog_off(1))
root_window.bind("<KeyRelease-Right>", lambda e: jog_off(1))
with this code in axisrc all work fine:
#swap bind key
# Bind ( and ) to jog axis 3 (0=X, 1=Y, 2=Z, 3=A, 4=B, ...)
root_window.bind("<Up>", lambda e: jog_on(0, -get_jog_speed(0)))
root_window.bind("<Down>", lambda e: jog_on(0, +get_jog_speed(0)))
root_window.bind("<KeyRelease-Up>", lambda e: jog_off(0))
root_window.bind("<KeyRelease-Down>", lambda e: jog_off(0))
root_window.bind("<Left>", lambda e: jog_on(1, -get_jog_speed(1)))
root_window.bind("<Right>", lambda e: jog_on(1, +get_jog_speed(1)))
root_window.bind("<KeyRelease-Left>", lambda e: jog_off(1))
root_window.bind("<KeyRelease-Right>", lambda e: jog_off(1))
Please Log in or Create an account to join the conversation.
8 years 11 months ago #101360
by mrchar
Replied by mrchar on topic Re:Keyboard re-mapping (key binding)
Hello, how can I do this when I don't have .axisrc?
I have 2.7.11 linuxcnc
thank you
I have 2.7.11 linuxcnc
thank you
Please Log in or Create an account to join the conversation.
8 years 11 months ago #101383
by andypugh
Replied by andypugh on topic Re:Keyboard re-mapping (key binding)
You can just create the .axisrc file and it will be used.
Create it with the system text editor (probably Mousepad or Gedit) in your home folder.
Create it with the system text editor (probably Mousepad or Gedit) in your home folder.
Please Log in or Create an account to join the conversation.
8 years 11 months ago #101390
by mrchar
Replied by mrchar on topic Re:Keyboard re-mapping (key binding)
THANK YOU, it works!!!
Please Log in or Create an account to join the conversation.
8 years 9 months ago #105280
by Lazarov
Replied by Lazarov on topic Keyboard re-mapping (key binding)
Hello.
I trying to change the buttons on the keyboard but it does not work.
Left Arrow --> X-
Right Arrow --> X+
Up Arrow --> Y-
Down Arrow --> Y+
Where should I create the .axisrc file?
Here is my code in .axisrc file:
#swap bind key
# Bind ( and ) to jog axis 3 (0=X, 1=Y, 2=Z, 3=A, 4=B, ...)
root_window.bind("<Up>", lambda e: jog_on(1, -get_jog_speed(1)))
root_window.bind("<Down>", lambda e: jog_on(1, +get_jog_speed(1)))
root_window.bind("<KeyRelease-Up>", lambda e: jog_off(1))
root_window.bind("<KeyRelease-Down>", lambda e: jog_off(1))
root_window.bind("<Left>", lambda e: jog_on(0, +get_jog_speed(0)))
root_window.bind("<Right>", lambda e: jog_on(0, -get_jog_speed(0)))
root_window.bind("<KeyRelease-Left>", lambda e: jog_off(0))
root_window.bind("<KeyRelease-Right>", lambda e: jog_off(0))
Do you have any idea?
Š¢hank you in advance.
I trying to change the buttons on the keyboard but it does not work.
Left Arrow --> X-
Right Arrow --> X+
Up Arrow --> Y-
Down Arrow --> Y+
Where should I create the .axisrc file?
Here is my code in .axisrc file:
#swap bind key
# Bind ( and ) to jog axis 3 (0=X, 1=Y, 2=Z, 3=A, 4=B, ...)
root_window.bind("<Up>", lambda e: jog_on(1, -get_jog_speed(1)))
root_window.bind("<Down>", lambda e: jog_on(1, +get_jog_speed(1)))
root_window.bind("<KeyRelease-Up>", lambda e: jog_off(1))
root_window.bind("<KeyRelease-Down>", lambda e: jog_off(1))
root_window.bind("<Left>", lambda e: jog_on(0, +get_jog_speed(0)))
root_window.bind("<Right>", lambda e: jog_on(0, -get_jog_speed(0)))
root_window.bind("<KeyRelease-Left>", lambda e: jog_off(0))
root_window.bind("<KeyRelease-Right>", lambda e: jog_off(0))
Do you have any idea?
Š¢hank you in advance.
Please Log in or Create an account to join the conversation.
Time to create page: 0.191 seconds