> Subject: Re: "Emulating" a right-click on the root window
> Date: Mon, 15 Jul 2002 10:55:59 -0400
> From: Roy Wood <[EMAIL PROTECTED]>
> To: "blackbox" <[EMAIL PROTECTED]>
> 
> >Is there anyway to send an event/atom/whatever to the
> >root window to say "hey buddy, someone right-clicked
> >on you, handle it" ??
> 
> I've done just that by patching bbkeys.  I'm getting the patch ready to 
> submit to the bbkeys folks, but here's the basic idea:
> 
> 
> I added the following actions to bbkeys:
> 
>      MouseUp - move cursor up
>      MouseDown - move cursor down
>      MouseLeft - move cursor left
>      MouseRight - move cursor right
> 
>      MouseButton1 - send button 1 click to front window
>      MouseButton2 - send button 2 click to front window
>      MouseButton3 - send button 3 click to front window
> 
>      RootMouseButton1 - send button 1 click to root window
>      RootMouseButton2 - send button 1 click to root window
>      RootMouseButton3 - send button 1 click to root window

    unfortunately (with respect to the root menu navigation w/ keyboard)
    this is more of a hack than a solution.  two reasons:

    1) you typically won't want to send "i've just clicked the lmb", but
       "show me the menu". for this to work, blackbox would have to have
       keybindings, which is not the case... kinda chicken and egg.

    2) moving the cursor like that is probably useful if you're forced
       to work on a laptop, but is completely unusable (imo) for menu
       navigation. i've used such an emulation in menus once, and it was
       major pain. preferrable behavior (skip to the next/prev item /
       open/close submenu) would require keybindings.

    don't take me wrong, i'd myself love to be able to open the menu
    with a keypress, and navigate it with hjkl...

> The only annoying bit is mouse movement-- particularly how far to move 
> the mouse for each keystroke.  I actually made that a parameter in the 
> .bbkeysrc file, though it is not very elegant (you cannot currently set 
> different movement amounts for different keybindings, so you cannot have 
> alt-KP_8 move the mouse up 20 pixels and KP_8 move it up 10 pixels).


-- 
FreeBSD 4.6-STABLE
5:01PM up 2 days, 7:15, 2 users, load averages: 0.00, 0.02, 0.00

Reply via email to