Submitted by LeftEccoForIQ on 2022/04/10 09:24

When focus is on the grid, the letter keys are sadly neglected (no use at all, except to start editing and output that character first in the edit box). Below is my proposal of a left-hand navcluster to make the most-used item commands available in an easy-to-remember spatial layout. This is working Autohotkey code:

    #If WinActive("ahk_class ThunderRT6MDIForm ahk_exe InfoQube.exe") and Win_GetFocusedClass() = "Exontrol.Gantt.WindowList"
        
        $q:: Send ^!{Up} ;; move item to top of grid
        $w:: Send !{PgUp} ;; move item up 10 slots
        $e:: Send {Up} ;; move focus up
        $r:: Send !{Up} ;; move item up
        $t:: Send ^{Space} ;; toggle fold / expand current branch
        
        $a:: Send !{Left} ;; move item left / promote item
        $s:: Send {Left} ;; move focus left
        $d:: Send {Down} ;; move focus down
        $f:: Send {Right} ;; move focus right
        $g:: Send !{Right} ;; move item right
        
        $y:: Send ^!{Down} ;; move item to bottom of grid
        $x:: Send !{PgDn} ;; move item down 10 slots
        $v:: Send !{down} ;; move item down

        $Space:: Send {F2} ;; change / edit focused item

;;;;;;;;;;;;;;

Win_GetFocusedClass()
{
ControlGetFocus, AControl, A
return, RegExReplace(AControl, "\d", "")
}

 

Comments

Putting this on the left hand seems to make the most sense as it leaves the right hand free to operate the mouse. Should be mirrored for lefties, of course.

Just ignore the dollar sign at the beginning of each line - pressing q moves item to the top of the grid etc. When editing starts, the keys will output characters as normal.

Space is also unused, I guess we could give it 'toggle fold / expand' instead of putting that on T. If anyone wants other stuff added, I'm sure we could squeeze in a couple more commands.

If people like it, maybe add it to IQ's native keyboard shortcuts?

This is wonderful!  I'm thinking maybe the spacebar would be better for F2 since the c is not an easy key to access. ("T" feels correct to me for the fold). I'll experiment some more. It will need mirrored for , since I use both a left and a right mouse and would be using both a right and left cluster.

Could you help me figure out the AHK? I just used the first part of the statement, since the "and Win_GetFocusedClass() = "Exontrol.Gantt.WindowList" ;+" wasn't working.  I don't do much AHK except for hotstrings so I couldn't figure out the second half.

Window spy gives me ClassNN:    Exontrol.G2antt.WindowList1 

Is there such a thing as Win_GetFocusedClass?

Is that trailing + doing anything (I'm used to + representing shift)?

Is a return at the end necessary?

Thanks

Keith

 

Hullo Keith and sorry about my sloppy post. Glad you're finding this useful!

Win_GetFocusedClass() is a wrapper function I use to be able to access that information more conveniently when implementing contextual hotkeys. I've added the code to the OP, the regex gets rid of the number/digit at the end that I find usually just gets in the way.

;+ is just a special kind of comment symbol I use in Notepad++ to start a folded code block. It needs an associated ;- to end the block (which didn't get copied). I've gone and removed it as it is not relevant within Autohotkey.

Have also changed OP to make <Space> the toggle tree fold hotkey.

 

 

Suggestions