Re: [PD] send message to current pd-window
I was kind of hoping to find a simple and existing solution for globally sending hid inputs to the current Pd-patch / subpatch / window inside of Pd. Since I need this only for speeding up programming I found an external solution btnx to reprogram the mouse buttons for sending key commands. That does the trick for me. Thanks anyway Ingo -Ursprüngliche Nachricht- Von: Jonathan Wilkes [mailto:jancs...@yahoo.com] Gesendet: Mittwoch, 28. August 2013 18:09 An: Ingo Betreff: Re: AW: [PD] send message to current pd-window On 08/28/2013 12:25 AM, Ingo wrote: Thanks for the suggestion! [active] can only tell if the current window has the focus or not. [active] together with [window_name] can actually send the current window name as soon as it gets activated but that would require placing an abstraction in every single patch and subpatch. I have a huge amount of abstractions and subpatches so that is kind of out of the question. Somehow Pd has to keep track of which window is currently opened and active. Isn't there a way to get that window / sub patch name without sending it from the actual subpatch itself? You could make a gui-plugin to do it. Check the tcl/tk documentation and the gui-rewrite plugin. I'm sure tcl/tk has a way to bind to such an event (or a way to create one if it doesn't). -Jonathan Alternatively - is there a way to send letters or ASCII characters from within Pd to Pd? Like CTRL + E for edit mode or anything else that can be done by QWERTY key commands? Ingo -Ursprüngliche Nachricht- Von: pd-list-boun...@iem.at [mailto:pd-list-boun...@iem.at] Im Auftrag von Jonathan Wilkes Gesendet: Dienstag, 27. August 2013 17:44 An: pd-list@iem.at Betreff: Re: [PD] send message to current pd-window On 08/27/2013 07:00 AM, Ingo wrote: I'trying to use a mouse button to toggle between edit mode on off. I'm using [hid] to get the mouse button and I can send the message to a specified window name. But how can I send it to the current window that I am working in? What would I have to use instead of windowname? [s pd-windowname] [s pd-filename.pd] or [s pd-subpatchname] To automatically figure out which window has the focus, I think there's a cyclone object that does that. Maybe [active] ? Thanks, Ingo ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
Re: [PD] send message to current pd-window
On 29/08/13 14:57, Ingo wrote: I was kind of hoping to find a simple and existing solution for globally sending hid inputs to the current Pd-patch / subpatch / window inside of Pd. Since I need this only for speeding up programming I found an external solution btnx to reprogram the mouse buttons for sending key commands. That does the trick for me. xbindkeys is a quite useful general tool for this kind of thing, mapping key or mouse combinations to commands, also if you want there is a scheme option for more intricate mappings of sequences etc. nice for configuring keystroke and mouse button independently of all the annoying desktop gui stuff. or triggerhappy (thd) which is similar but outside X Simon ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
Re: [PD] send message to current pd-window
Thanks! I'll take a look at those two. Ingo -Ursprüngliche Nachricht- Von: pd-list-boun...@iem.at [mailto:pd-list-boun...@iem.at] Im Auftrag von Simon Wise Gesendet: Donnerstag, 29. August 2013 09:36 An: pd-list@iem.at Betreff: Re: [PD] send message to current pd-window On 29/08/13 14:57, Ingo wrote: I was kind of hoping to find a simple and existing solution for globally sending hid inputs to the current Pd-patch / subpatch / window inside of Pd. Since I need this only for speeding up programming I found an external solution btnx to reprogram the mouse buttons for sending key commands. That does the trick for me. xbindkeys is a quite useful general tool for this kind of thing, mapping key or mouse combinations to commands, also if you want there is a scheme option for more intricate mappings of sequences etc. nice for configuring keystroke and mouse button independently of all the annoying desktop gui stuff. or triggerhappy (thd) which is similar but outside X Simon ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
Re: [PD] send message to current pd-window
On 08/28/13 06:25, Ingo wrote: Somehow Pd has to keep track of which window is currently opened and active. not really. pd-gui (tcl/tk) handles all those things. if it detects an event on window foo, it will send a message to Pd with the receiver foo. so Pd is quit agnostic about which window is currently open, and allows for multiple windows to send events simulatenously. i've been exploiting this in Peer Data, to allow M users patch on N windows at the same time (usually N=M). gfmasdr IOhannes signature.asc Description: OpenPGP digital signature ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
[PD] send message to current pd-window
I'trying to use a mouse button to toggle between edit mode on off. I'm using [hid] to get the mouse button and I can send the message to a specified window name. But how can I send it to the current window that I am working in? What would I have to use instead of windowname? [s pd-windowname] Thanks, Ingo ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
Re: [PD] send message to current pd-window
On 08/27/2013 07:00 AM, Ingo wrote: I'trying to use a mouse button to toggle between edit mode on off. I'm using [hid] to get the mouse button and I can send the message to a specified window name. But how can I send it to the current window that I am working in? What would I have to use instead of windowname? [s pd-windowname] [s pd-filename.pd] or [s pd-subpatchname] To automatically figure out which window has the focus, I think there's a cyclone object that does that. Maybe [active] ? Thanks, Ingo ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
Re: [PD] send message to current pd-window
Thanks for the suggestion! [active] can only tell if the current window has the focus or not. [active] together with [window_name] can actually send the current window name as soon as it gets activated but that would require placing an abstraction in every single patch and subpatch. I have a huge amount of abstractions and subpatches so that is kind of out of the question. Somehow Pd has to keep track of which window is currently opened and active. Isn't there a way to get that window / sub patch name without sending it from the actual subpatch itself? Alternatively - is there a way to send letters or ASCII characters from within Pd to Pd? Like CTRL + E for edit mode or anything else that can be done by QWERTY key commands? Ingo -Ursprüngliche Nachricht- Von: pd-list-boun...@iem.at [mailto:pd-list-boun...@iem.at] Im Auftrag von Jonathan Wilkes Gesendet: Dienstag, 27. August 2013 17:44 An: pd-list@iem.at Betreff: Re: [PD] send message to current pd-window On 08/27/2013 07:00 AM, Ingo wrote: I'trying to use a mouse button to toggle between edit mode on off. I'm using [hid] to get the mouse button and I can send the message to a specified window name. But how can I send it to the current window that I am working in? What would I have to use instead of windowname? [s pd-windowname] [s pd-filename.pd] or [s pd-subpatchname] To automatically figure out which window has the focus, I think there's a cyclone object that does that. Maybe [active] ? Thanks, Ingo ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list