Is there a setFocus for the main windows?

Share your scripts and packages with other Mudlet users.
Post Reply
jimbus
Posts: 14
Joined: Fri Nov 15, 2013 10:19 pm

Is there a setFocus for the main windows?

Post by jimbus »

I'd like to keymap f1, f2, f3, etc to set the focus to windows 1, 2, 3, etc, but I'm not having any luck finding the proper function call. I've searched google and the forums and not had much luck (and the chat help line seems moribund... at least during daytime hours EST)

Jimbus

User avatar
Vadi
Posts: 5035
Joined: Sat Mar 14, 2009 3:13 pm

Re: Is there a setFocus for the main windows?

Post by Vadi »

There isn't anything else besides the main input line that you can focus on, though?

jimbus
Posts: 14
Joined: Fri Nov 15, 2013 10:19 pm

Re: Is there a setFocus for the main windows?

Post by jimbus »

if I'm running 3 characters, I want to hotkey between them. Like ctl-tab may do it, which it is awkward to me (sorry), but I want to dedicate an f-key to each window.

Hope that's clearer :)

JimB

Update: Ctl-tab indeed does

User avatar
Vadi
Posts: 5035
Joined: Sat Mar 14, 2009 3:13 pm

Re: Is there a setFocus for the main windows?

Post by Vadi »

Awesome!

User avatar
SlySven
Posts: 1019
Joined: Mon Mar 04, 2013 3:40 pm
Location: Deepest Wiltshire, UK
Discord: SlySven#2703

Re: Is there a setFocus for the main windows?

Post by SlySven »

That sounds like a "standard" MDI application short-cut (I'll have to check whether <ctrl>-F4 closes the current profile if you are running multi-view - keyboard equivalent to close-tab button)!

If you ARE running in using multi-view - you may find that if you do close a profile but leave others running there are several things that get left behind with the current code: dock-able consoles created with openUserWindow(...); dock-able Mapper widget opened from the tool-bar map button rather than by a lua script in a profile; and any tool-bars from the closed profile - currently none of these are being cleaned up and some of them will crash the application if they are touched because they try to communicate with parts of the profile that has closed and gone away. I was vaguely aware of some issues with old maps not going away but when I went looking I found more issues than I originally expected...! I have almost cobbled together a fix but I am having trouble with Toolbars that have been included in a module - and the toolbar C++ code is not straightforward... :ugeek:

jimbus
Posts: 14
Joined: Fri Nov 15, 2013 10:19 pm

Re: Is there a setFocus for the main windows?

Post by jimbus »

I'm not trying to close anything, just looking to duplicate ctl-tab by having an f-key set to each character that brings it to the top when pressed. EG: Character1-f1, character2-f2, character3-f3

User avatar
SlySven
Posts: 1019
Joined: Mon Mar 04, 2013 3:40 pm
Location: Deepest Wiltshire, UK
Discord: SlySven#2703

Re: Is there a setFocus for the main windows?

Post by SlySven »

OK, it is just that you ARE multi-playing and this is a nasty bug that can be fatal to the application and thus any other sessions you still have open after closing one - until someone can fix it...!

BTW Which MUD are you playing that permits multi-playing (just for my reference for eventual testing with that feature)...

jimbus
Posts: 14
Joined: Fri Nov 15, 2013 10:19 pm

Re: Is there a setFocus for the main windows?

Post by jimbus »

GrimhavenMUD nee SneezyMud. Multiplay has been traditionally verbotten. however, since it's resurrected and the community is very small, they've opened it up.

Post Reply