On Sun, May 15, 2011 at 11:26:54PM +0100, Thomas Adam wrote:
> On Mon, May 16, 2011 at 12:18:44AM +0200, Titus von der Malsburg wrote:
> > Hi list, I'd like to have a key that toggles the state of a specific
> > window instead of the window that currently has focus.  Two thing that
> > I'd like to have are: toggle iconification of Emacs with Ctrl+F3 and
> > toggle WindowShade state of Emacs with F3.  I sifted through various
> > resources but can't find the solution.  Any help is greatly
> > appreciated!
> 
> Since you make no guarantee of the number of Emacs windows, a blind approach
> to this is:
> 
> Key F3 A A All (WindowsWhichAreEmacsClassName) WindowShade
> Key F3 A C All (WindowsWhichAreEmacsClassName) Iconify
> 
> Which means you can reduce this to something like:
> 
> Key F3 A A SomeFunc WindowShade
> Key F3 A C SomeFunc Iconify
> 
> DestroyFunc SomeFunc
> AddToFunc   SomeFunc
> + I All (WindowsWhichAreEmacsClassName) $0

And before you ask, you could make this a window-specific binding:

Key (NameOfEmacsClass) F3 A A SomeFunc WindowShade
Key (NameOfEmacsClass) F3 A C SomeFunc Iconify

But I don't know if this is going to work well with Emacs, or if it's what
you want.  Because Emacs would have to understand synthetic events, which I
am not sure it does, or can be told to do so.  YMMV.

-- Thomas Adam

-- 
"Deep in my heart I wish I was wrong.  But deep in my heart I know I am
not." -- Morrissey ("Girl Least Likely To" -- off of Viva Hate.)

Reply via email to