Subject: FVWM: multiple keybindings

From: calmar <[email-masked]>
Date: Sun, 15 Feb 2004 05:16:45 +0100

Hi,
is it possible to set up multiple keybindings in the way p.e
emacs use it: (p.e)

Ctrl-E + Ctrl-A should do something...

A native support obviously is not there, maybe when a Ctrl-E
would call a subroutine what listens to the next key-combination
(Ctrl-A) and executes what ever is defined for in this
subroutine.

Thanks and Greetings
marco candrian
-- 
  calmar 
           (o_         GNU/Linux is GREAT      
           //\                 
           V_/_        http://www.calmar.ws 

--
Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to [email-masked].
To report problems, send mail to [email-masked].

---

From: calmar <[email-masked]>
Date: Sun, 15 Feb 2004 06:18:46 +0100

calmar <[email-masked]> writes:

Well one solution someone gave on #fvwm is to pup up a menu with
Ctrl-E and then choose the apps with a-z.
So I'm very happy with this now.
Greetings

---

From: Ruslan Kosolapov <[email-masked]>
Date: Sun, 15 Feb 2004 11:53:22 +0600

c> is it possible to set up multiple keybindings in the way p.e emacs
 c> use it: (p.e)

 c> Ctrl-E + Ctrl-A should do something...

 c> A native support obviously is not there, maybe when a Ctrl-E would
 c> call a subroutine what listens to the next key-combination
 c> (Ctrl-A) and executes what ever is defined for in this subroutine.

  I just use fvwm menu for this task: Ctrl-Menu open a menu, and then
  I can select menu items by hotkeys.  For me this looks like emacs
  keybindings, for example, I close window with Ctrl-Menu, then w,
  then c:

----8<----------------------------------------
AddToMenu WindowMenu
+ "&Close" Close

AddToMenu MainFvwmMenu
+ "&Window menu" Popup WindowMenu

Key Menu A C Menu MainFvwmMenu nop
------------------------------------------>8---

  But this method is not work for keybindings like Ctrl-Menu Ctrl-e
  Alt-w, because fvwm do not support modificators for menu hotkeys
  (fix me if I wrong).

  Also you can try to use something external program like epist
  (http://icculus.org/openbox/2/epist.php) from Openbox2 - this
  program support "true" a-la emacs keybindings.

  I.e. in fvwm you not describe no one keybindings (this mean you must
  unset default keybindings too), in epist you describe all needed
  keybindings.  FvwmCommand help you translate commands from epist to
  fvwm.

  But how it will work with fvwm I don't know.  :)

-- 
=[ Почему в конце денег остаётся ещё так много месяца?
=[                               -- grey, 2003

---

From: Tavis Ormandy <[email-masked]>
Date: Sun, 15 Feb 2004 09:01:45 +0000

> Ctrl-E + Ctrl-A should do something...

Someone asked a similar question a couple of months ago, Mikhael offered
an interesting solution:

http://www.hpc.uh.edu/fvwm/archive/0312/msg00281.html

-- 
-------------------------------------
[email-masked] | finger me for my gpg key.
-------------------------------------------------------
--
Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to [email-masked].
To report problems, send mail to [email-masked].

---

From: calmar <[email-masked]>
Date: Sun, 15 Feb 2004 10:41:32 +0100

> http://www.hpc.uh.edu/fvwm/archive/0312/msg00281.html

Yeah, really interesting. I will copy this for (maybe) later
use. Actually I'm quite happy with the idea of opening a menu and
then select is with a simple keystroke.

Greetings all,
marco candrian

---

From: Frank Gruellich <[email-masked]>
Date: Wed, 18 Feb 2004 00:09:44 +0100

> > Someone asked a similar question a couple of months ago, Mikhael offered

'Someone' was me, meanwhile I use and love it.  Thanks again to Mikhael.
And thanks to this great window manager.

> then select is with a simple keystroke.

Maybe somebody can use (or improve) this.  As advised in this posting I
use two functions to bind/unbind keys on demand.  But I did not like the
idea of maintaining two list of keys, so I PipeRead them from a separate
file:

 DestroyFunc ExecCommand
 AddToFunc   ExecCommand
 + I PipeRead 'awk \'/^[^#$]/{printf "%s %s %s %s -\\n", $$$1, $$$2, $$$3, $$$4;}\' $HOME/.fvwm/fvwm2rc.keys2nd'
 + I Key Escape  A A -
 + I $*
 
 DestroyFunc ReadyCommands
 AddToFunc   ReadyCommands
 + I PipeRead 'awk \'/^[^#$]/{printf "%s %s %s %s ExecCommand", $$$1, $$$2, $$$3, $$$4; for(i=5; i<=NF; i++) printf " %s", $$i; p
 + I Key Escape  A A ExecCommand Nop
 
 Key M A C ReadyCommands

I use C-M to introduce my command (m as in fvw*m*[1]).  The
fvwm2rc.keys2nd uses standard fvwm key binding syntax, eg:

 # page movement
 Key h           A       S               GotoPage -1p 0p
 Key k           A       S               GotoPage 0p -1p
 Key l           A       S               GotoPage 1p 0p
 Key j           A       S               GotoPage 0p 1p
 Key m           A       A               GotoPage prev
 
 # desktop movement
 Key 0           A       N               GotoDesk 0 0
 Key 1           A       N               GotoDesk 0 1
 Key 2           A       N               GotoDesk 0 2
 Key 3           A       N               GotoDesk 0 3
 Key 4           A       N               GotoDesk 0 4
 Key 5           A       N               GotoDesk 0 5

HTH,
 regards, Frank.
===footnotes===
[1] In fact, m is the only letter in fvwm on the right side of the
keyboard.  The whole left side is 'reserved' for menu movement, the
right side I use for GNU screen (and alike) strokes.
-- 
Sigmentation fault
--
Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to [email-masked].
To report problems, send mail to [email-masked].