Page 1 of 1

Key or key sequence to set focus on the active tab

PostPosted: Wed Oct 26, 2011 8:01 am
by daniloturina
Re-posting as a distinct thread (and re-phrasing it a bit) because I don't know if it was read by the maintainers of mRemoteNG (and I didn't get an answer).

Alt-Tab (from another application) to mRemoteNG is not enough to start typing into the active tab, instead it's needed to click inside the tab (i.e. in the hosted application, for examply, Putty).

If it wasn't for this "problem", mRemoteNG would be perfect for me (I previously used Poderosa, but I'm having some display problems lately and that project is no more developed since years).
This is because I often switch from a text editor to mRemoteNG and back using Alt-Tab, so when I switch from the text editor to mRemoteNG (where I have some Putty consoles open) I need to use the mouse and click to focus Putty. This is really weird, since I don't even have my hand over the mouse at that moment.

The solution, imho, is really simple: a key or a key combination to switch focus from mRemoteNG to the hosted application (Putty in my case).

I explain it better, if mRemoteNG would provide, for example, Tab (or Ctrl+Down or something else) to do that job I could use mRemoteNG this way:
from editor to mRemoteNG: Alt+Tab followed by Tab (no need to use the mouse and I already have my finger over the Tab key)
from mRemoteNG to editor: Alt+Tab (no need to use the mouse)

Unless this is already implemented and I wasn't able to find that key (in that case, please, let me know which is that key/key combination).

Re: Key or key sequence to set focus on the active tab

PostPosted: Thu Oct 27, 2011 4:44 am
by Def
This shouldn't be a shortcut key, it should be automatic.

The code for this is laughably simple, but it's something you (as an application developer) need to implement yourself. Here's how I do it in Project: Merge... (This code should be placed in the message handler of the top level window for an application.)

Code: Select all
        case WM_ACTIVATEAPP:
        {
            if( !w )
            {
                mOldFocus = GetFocus();
            }
            break;
        }
        case WM_SETFOCUS:
        {
            if( mOldFocus )
            {
                SetFocus( mOldFocus );
                mOldFocus = NULL;
            }
            break;
        }


Update: I've noticed the situation is even worse than I previously thought: Clicking on a tab of an open connection doesn't set the focus to that terminal correctly either.

Re: Key or key sequence to set focus on the active tab

PostPosted: Fri Oct 28, 2011 1:20 am
by daniloturina
Automatic would be even better, but, for me, also manual would be nice.
At the moment I have nothing (I have to use the mouse).

Re: Key or key sequence to set focus on the active tab

PostPosted: Tue Nov 08, 2011 3:49 am
by daniloturina
Ignore the whole request: I switched to MTPuTTY.

Re: Key or key sequence to set focus on the active tab

PostPosted: Sun Dec 04, 2011 9:06 pm
by rmcardle
This is a quirk with how mRemoteNG integrates PuTTY. I will see if there is a way we can make it work.

Re: Key or key sequence to set focus on the active tab

PostPosted: Tue Jun 26, 2012 2:36 pm
by Woody
Did you manage to find a solution? As the OP said, it makes using putty quite frustrating.

Thanks

Re: Key or key sequence to set focus on the active tab

PostPosted: Thu Dec 20, 2012 9:33 am
by rmcardle
Try the 1.70 beta.