Keyboard re-mapping (key binding)

More
14 years 11 months ago #14705 by ioiotutu
It is clear.

I'll try.

Thanks.

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

More
14 years 11 months ago #14712 by ioiotutu
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))

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

More
8 years 11 months ago #101360 by mrchar
Hello, how can I do this when I don't have .axisrc?

I have 2.7.11 linuxcnc

thank you

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

More
8 years 11 months ago #101383 by andypugh
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.

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

More
8 years 11 months ago #101390 by mrchar
THANK YOU, it works!!!

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

More
8 years 9 months ago #105280 by Lazarov
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.

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

Time to create page: 0.191 seconds
Powered by Kunena Forum