You are not logged in.

#1 2012-10-29 09:42:02

OhneHerren
Member
Registered: 2012-07-09
Posts: 36

Right-click context menu keyboard shortcut (Fluxbox)

Does anyone know how to activate the right click context menu with a keyboard shortcut (In Fluxbox, if this is DE-specific)? I've tried shift+spacebar and shift+F10, but these only work in specific applications (Chrome, notably). I could emulate a right mouse click with xdotool but that would open the context menu where the cursor is, which I generally have disabled.

Offline

#2 2012-10-29 11:34:24

2ManyDogs
Forum Fellow
Registered: 2012-01-15
Posts: 4,648

Re: Right-click context menu keyboard shortcut (Fluxbox)

Look in the ~/.fluxbox/keys file. You will see that "RootMenu" is the command to start the root menu. You can just define your own shortcut in that file. For example, this assigns "mod4 + m" to start the root menu:

Mod4 M :RootMenu

Remember to restart fluxbox after you change the keys file.

Last edited by 2ManyDogs (2012-10-29 11:36:13)

Offline

#3 2012-10-29 11:59:34

OhneHerren
Member
Registered: 2012-07-09
Posts: 36

Re: Right-click context menu keyboard shortcut (Fluxbox)

Thanks Dogs, I mean though the general context menu you get when you right click any application, not any specific Fluxbox menu. I only specified Fluxbox because I thought the keyboard shortcut for this might be DE-specific.

Offline

#4 2012-10-29 12:04:19

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,554
Website

Re: Right-click context menu keyboard shortcut (Fluxbox)

I think you'd need to use something like xdotool.  X itself doesn't know anything about "context menus".  These are generated by the individual applications when they receive a right mouse click.

With xdotool you can reposition the mouse cursor to any location you'd want the menu at and simulate the right mouse click.

Alternately if you have any programming experience you could make a trivially small program to do just that one thing: aside from the basic Xlib initialization the program would only need to make a single call to XSendEvent.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#5 2012-10-29 12:26:12

2ManyDogs
Forum Fellow
Registered: 2012-01-15
Posts: 4,648

Re: Right-click context menu keyboard shortcut (Fluxbox)

Ah, sorry I misunderstood the question. I think Trilby is right about xdotool. If you're trying to do most things with the keyboard, may I suggest another window manager, ratpoison? It's designed to be completely keyboard driven and has a built-in "ratclick" command that allows you to simulate mouse clicks.

(edit) and if you wait a few hours, Trilby's excellent Tiny Tiler / Tabbed Tiler window manager will also have "ratclick"... smile Would you like to add "ratwarp" and "ratwelwarp" too, Trilby? They move the mouse pointer to absolute or relative coordinates.

(sorry for the minor topic derailment, OhneHerren)

Last edited by 2ManyDogs (2012-10-29 15:18:06)

Offline

#6 2012-10-29 12:38:50

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,554
Website

Re: Right-click context menu keyboard shortcut (Fluxbox)

2ManyDogs wrote:

... has a built-in "ratclick" command ...

Ooh, there's a feature worth stealing.  Off to write a new function.

EDIT: OhneHerren, your issue lead me to writting a tool to address just this sort of desire.  If you'd like to try it out check out the thread here.  This is brand new, so I cannot promise stability, but it should do just what you are looking for when invoked as "iocane button 3".  Iocane should be entirely WM-independent so it should work fine with fluxbox or any other wm.

Last edited by Trilby (2012-10-29 18:42:55)


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#7 2012-11-03 08:18:41

OhneHerren
Member
Registered: 2012-07-09
Posts: 36

Re: Right-click context menu keyboard shortcut (Fluxbox)

2ManyDogs wrote:

Ah, sorry I misunderstood the question. I think Trilby is right about xdotool. If you're trying to do most things with the keyboard, may I suggest another window manager, ratpoison? It's designed to be completely keyboard driven and has a built-in "ratclick" command that allows you to simulate mouse clicks.

(edit) and if you wait a few hours, Trilby's excellent Tiny Tiler / Tabbed Tiler window manager will also have "ratclick"... smile Would you like to add "ratwarp" and "ratwelwarp" too, Trilby? They move the mouse pointer to absolute or relative coordinates.

(sorry for the minor topic derailment, OhneHerren)

Yeah I have been putting off switching to a keyboard-centric window manager because of my investment in Fluxbox, but Trilby's looks like a very viable option and I should take the plunge.

Trilby wrote:

EDIT: OhneHerren, your issue lead me to writting a tool to address just this sort of desire.

Trilby both your window manager and this new poisonous tool look very interesting; I'll test them both shortly.

Thanks muchly for your assistance Trilby and Dogs.

Offline

Board footer

Powered by FluxBB