BTW, where did you find that “def bind_axis” thing? I was trying to find what
the code meant.
I found a forum post where someone claims that you can change the key mapping
(see below). In following those instructions I added this to my .axisrc file
but it didn’t help (I also tried changing the sign in front of get_jog_speed in
case I had it on the wrong one but that didn’t work either...
root_window.bind(“<Up>", lambda e: jog_on(0, -get_jog_speed(30)))
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-Downt>", lambda e: jog_off(0))
I got “Up" and “Down" by running the xev thing where I get a line that looks
like:
state 0X10, keycode 111 (keysym 0xff52, Up), same_screen Yes,
and
state 0X10, keycode 116 (keysym 0xff54, Down), same_screen Yes,
when I hit the up and down arrow keys respectively
-Tom
===================================================
"AXIS doesn't pay attention to jog keys with modifier keys pressed
because this had some bad interactions with using the numeric keypad as
digits in MDI mode.
You can put magic incantations in the file ~/.axisrc that customize the
jog keys and also get rid of this behavior of ignoring the key if a
modifier key is pressed.
Here is an example which changes the keys that jog the active axis, and
the keys that jog the A axis:
# -- cut here
# Bind ; and ' to jog active axis
root_window.bind("<semicolon>", commands.jog_minus)
root_window.bind("<apostrophe>", commands.jog_plus)
root_window.bind("<KeyRelease-semicolon>", commands.jog_stop)
root_window.bind("<KeyRelease-apostrophe>", commands.jog_stop)
# Bind ( and ) to jog axis 3 (0=X, 1=Y, 2=Z, 3=A, 4=B, ...)
root_window.bind("<parenleft>", lambda e: jog_on(3, -get_jog_speed(3)))
root_window.bind("<parenright>", lambda e: jog_on(3, get_jog_speed(3)))
root_window.bind("<KeyRelease-parenleft>", lambda e: jog_off(3))
root_window.bind("<KeyRelease-parenright>", lambda e: jog_off(3))
# -- cut here
To edit your ~/.axisrc file, open a terminal window (Applications > Accessories
>
Terminal). Then type "gedit .axisrc". Paste the lines above into the file,
then click save, then close the application.
The next time you run emc, the settings in the .axisrc file will take effect.
To edit it again, just do the same thing: "gedit .axisrc" in the
terminal.
If you want to use different keys, here's how to figure out what to use instead
of "parenleft" and so on: In the terminal, type "xev". A new window
will pop up. Click on it, but keep an eye on the terminal window. When
you press a key, it will print several lines of information on the
terminal. The one that matters is this one:
state 0x0, keycode 34 (keysym 0x5b, bracketleft), same_screen YES,
^^^^^^^^^^^
that keysym string is the one to put in your .axisrc file.
Jeff”
===================================================
------------------------------------------------------------------------------
Monitor 25 network devices or servers for free with OpManager!
OpManager is web-based network management software that monitors
network devices and physical & virtual servers, alerts via email & sms
for fault. Monitor 25 devices for free with no restriction. Download now
http://ad.doubleclick.net/ddm/clk/292181274;119417398;o
_______________________________________________
Emc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-users