Machsupport Forum

Mach Discussion => Mach4 General Discussion => Topic started by: MitchB on December 22, 2015, 01:23:30 PM

Title: Disabling arrow keys for jogging when editing MDI
Post by: MitchB on December 22, 2015, 01:23:30 PM
I like using the keyboard arrow keys for jogging.  But when I want to edit something in the MDI window, the arrow keys continue to jog instead of moving me around the text.  I thought that in Mach 3, when MDI editing, the arrow keys stopped jogging.

Aside from choosing other keys for jogging, is there a way to prevent the arrow keys from jogging while editing in the MDI window?
Title: Re: Disabling arrow keys for jogging when editing MDI
Post by: Chaoticone on December 22, 2015, 03:18:53 PM
At some point we may be able to do it in the Keyboard inputs enable/disable button but for now you can disable and enable it in the taskbar. You can click on the CNC Keyboard functions icon (looks like a keyboard) and disable/enable it.
Title: Re: Disabling arrow keys for jogging when editing MDI
Post by: Pedio on December 22, 2015, 06:32:45 PM
My version remembers this setting. I have disabled it.
Title: Re: Disabling arrow keys for jogging when editing MDI
Post by: Steve Stallings on December 22, 2015, 06:54:16 PM
A workaround for this issue might be to re-configure the keyboard plug-in
so that all the jog functions require Shift, Alt, or Ctrl to be held down.
My choice would be to change the defaults so that Incremental jogs
require Alt and normal continuous jogs require the Ctrl which is just to
the left of the arrow keys on most keyboards. Rapid jog would still use
the Shift key.

You can access the keycode settings by using CONFIG > PLUG-INS and select
the keyboard plug-in.
Title: Re: Disabling arrow keys for jogging when editing MDI
Post by: Pedio on December 22, 2015, 08:39:21 PM
I like Steve's suggestion if you want keyboard control. I have the Shuttle Pro as a pendant. It works GREAT!!!!!
Title: Re: Disabling arrow keys for jogging when editing MDI
Post by: Chaoticone on December 23, 2015, 11:19:20 AM
I like Steve's suggestion if you want keyboard control. I have the Shuttle Pro as a pendant. It works GREAT!!!!!

Definitely worth considering. Anyone else want to weigh in? Feel free to.
Title: Re: Disabling arrow keys for jogging when editing MDI
Post by: DazTheGas on December 23, 2015, 05:14:19 PM
Well I did think of doing something on these lines in the plc but the keys are then dead so its obviously disabling the motion and not the plugin.

Code: [Select]
    local tab, rc = scr.GetProperty("MainTabs", "Current Tab")
    local tabG_Mdione, rc = scr.GetProperty("nbGCodeMDI1", "Current Tab")
    local iReg = mc.mcIoGetHandle (0, "Keyboard/EnableKeyboardJog")
    if ((tonumber(tab) == 0 and tonumber(tabG_Mdione) == 1)) then
    mc.mcIoSetState(iReg, 0);
    else
    mc.mcIoSetState(iReg, 1);
    end

It would be easy to implement in the keyboard plugin using the new api command mcRegSendCommand this could send a command to disable the plugin whilst the mdi has focus instead of disabling it via the taskbar.

But failing that then Steves idea is prob the bets solution

Daz
Title: Re: Disabling arrow keys for jogging when editing MDI
Post by: DPSanDiego on October 08, 2016, 06:52:02 PM
These workarounds don't seem to change the behavior of Mach capturing ALL the arrow keys strokes whether Mach is the Windows foreground program or not.  I would like my arrow keys to work when I'm using a a separate editor program outside of Mach, but if Mach is running, arrow keys don't work in any other running program.  Mach should only consume keystrokes if it is the foreground program.  How do I get Mach to play nicely with other programs like editors?

Thanks.
Title: Re: Disabling arrow keys for jogging when editing MDI
Post by: DazTheGas on October 09, 2016, 02:23:16 AM
Not sure if this may help  http://www.machsupport.com/forum/index.php/topic,33270

DazTheGas
Title: Re: Disabling arrow keys for jogging when editing MDI
Post by: DPSanDiego on November 22, 2016, 01:05:40 AM
Yes! - thanks a lot.  That helps for editing from within Mach4.  That's a big help.  Is there a place I can place those same scripts to activate and deactivate the keyboard plugin when Mach comes and goes from being the program-of-focus in the foreground of Windows?