Re: make the root-menu appear at a fixed location when opening it with a keyboard shortcut, possible?

Anthony Thyssen <A.Thyssen-YlX7AVbyhojX/[email protected]>
Newsgroups gmane.comp.window-managers.openbox
Message-ID <[email protected]>
On Tue, 23 Sep 2014 17:13:58 -0400
Plmalternate Plmalternate <[email protected]> wrote:
|
| > Date: Mon, 22 Sep 2014 22:15:29 +0200
| > From: Sébastien <[email protected]>
| >
| > le 2014-09-21 à 06:54, Plmalternate écrivit:
| >> When opening the root menu with a keybinding, is it possible to have
| >> it open in a pre-set location rather that wherever the pointer happens
| >> to be?
| >
| > I answered a similar question earlier this year which might help:
| > http://icculus.org/pipermail/openbox/2014-January/008430.html
| >
| > Hope this helps,
| > Sébastien
| 
|
| Thank you all, gentlesapients.
| Here is what I got to work:
| 
| I set a keybinding to this bash script:
| 
| #! /bin/bash
| xte 'mousemove 3 3'
| sleep 1
| xte 'mouseclick 3'
| 
| The "xte 'mousemove 3 3'"  puts the pointer in a space occupied by a
| small conky window, which passes any click on to the root window.
| 
| The "sleep 1" gives me enough time to get my fingers off the keys
| before the following "xte 'mouseclick 3'", which is a right click.
| Otherwise the right click is modified by the key or keys still being
| held down. I'd love to have a more elegant way to do this, both so
| that I wouldn't have to remember to release the keys promptly, and so
| the menu would pop up quicker, but so far that's the best I've come up
| with.
| 
Keyboard bindings or macros, are difficult things, especially when many
programs have there own, often weird, keybindings.

For consistency I tend to make all my global key bindings 'Meta'
shifted (The 'window key' on my keyboard).

My own notes on keyboard bindings are published in
   http://www.ict.griffith.edu.au/anthony/info/X/event_handling.txt

And it also focuses on using "xte" (from the xautomation package) 
but to generate keyboard macros.

For example, I press Meta-F1 and my email address is typed in whatever
window the pointer is in, even input windows that does NOT accept
'paste' events normally!

I also had problems with having to release 'shifting' keys quickly
which is another reason why 'meta' is a good one as it is normally
completely ignored by many programs. (not Firefox!)

Look for the section "The Bigger Problem: Modifiers"

Basically...
  The "xdotool" has a --clearmodifiers option

This was added for this very reason!

WARNING: Watch out for "Recursive Macros"...  :-)


What we really need is a tool that can both wait for specific events
AND then send events.  EG: wait for keys to be released, and then
apply events or run a program.  But it seems such a tool is very
tricky to create, and only used by advanced X window users.




  Anthony Thyssen ( System Programmer )    <[email protected]>
 --------------------------------------------------------------------------
   Take this cheese to sick bay!!!
   The Doctor should have a look at it.
                                 -- StarTrek Voyager "Training"
 --------------------------------------------------------------------------
   Anthony's Castle     http://www.ict.griffith.edu.au/anthony/
_______________________________________________
openbox mailing list
[email protected]
http://icculus.org/mailman/listinfo/openbox
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.