Yo - anyone have any ideas on getting the focus state of a window in Pd? I want to only enable key commands when the relevant window is focused - I have lots of miniature applications and it makes much more sense to treat them independently - I think the global nature of keystroke handling is what keeps me from every really using it!
(And, I know [tot] can tell me when a window is focused, but not when it's unfocused, meaning I'd need a [tot] in every single window. no good)
Best Luke
On Sat, 2009-02-21 at 03:46 -0800, Luke Iannini wrote:
Yo - anyone have any ideas on getting the focus state of a window in Pd? I want to only enable key commands when the relevant window is focused - I have lots of miniature applications and it makes much more sense to treat them independently - I think the global nature of keystroke handling is what keeps me from every really using it!
(And, I know [tot] can tell me when a window is focused, but not when it's unfocused, meaning I'd need a [tot] in every single window. no good)
another approach would be to control from pd, which window is in focus by using 'vis' messages sent to canvasses. you could implement some keystrokes to navigate through all available windows. this way you wouldn't have to leave the keyboard for switching between windows and compared to the built-in window switcher of your window manager, it has some advantages: a) you can access pd windows, that weren't already open; b) you can design it for your particular needs, so that only pd windows can be accessed, that are meant to be accessed. then you only need to route the key messages to the window, that last received the 'vis 1' message.
this is not exactly what you asked for, but i hope it is useful for you anway.
roman
Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de
active by cyclone?
Yo - anyone have any ideas on getting the focus state of a window in Pd? I want to only enable key commands when the relevant window is focused - I have lots of miniature applications and it makes much more sense to treat them independently - I think the global nature of keystroke handling is what keeps me from every really using it!
(And, I know [tot] can tell me when a window is focused, but not when it's unfocused, meaning I'd need a [tot] in every single window. no good)
Best Luke
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management ->
http://lists.puredata.info/listinfo/pd-list
On Sat, 21 Feb 2009, Luke Iannini wrote:
Yo - anyone have any ideas on getting the focus state of a window in Pd? I want to only enable key commands when the relevant window is focused - I have lots of miniature applications and it makes much more sense to treat them independently - I think the global nature of keystroke handling is what keeps me from every really using it! (And, I know [tot] can tell me when a window is focused, but not when it's unfocused, meaning I'd need a [tot] in every single window. no good)
use bind on <FocusOut> instead of <FocusIn>.
_ _ __ ___ _____ ________ _____________ _____________________ ... | Mathieu Bouchard - tél:+1.514.383.3801, Montréal, Québec
João, [active]'s just what I was looking for, thanks! Roman - yeah maybe one day I'll take control of the window management to that level but right now I'm mostly satisfied mousing around : ) Mathieu - hm, I was just using the right bang outlet of [tot] ... not familiar enough to implement what you're suggesting : )
Thanks very much all Luke
On Sat, Feb 21, 2009 at 10:37 AM, Mathieu Bouchard matju@artengine.ca wrote:
On Sat, 21 Feb 2009, Luke Iannini wrote:
Yo - anyone have any ideas on getting the focus state of a window in Pd? I want to only enable key commands when the relevant window is focused - I have lots of miniature applications and it makes much more sense to treat them independently - I think the global nature of keystroke handling is what keeps me from every really using it! (And, I know [tot] can tell me when a window is focused, but not when it's unfocused, meaning I'd need a [tot] in every single window. no good)
use bind on <FocusOut> instead of <FocusIn>.
_ _ __ ___ _____ ________ _____________ _____________________ ... | Mathieu Bouchard - tél:+1.514.383.3801, Montréal, Québec