Subject: FVWM: key bindings

From: Neil Zanella <[email-masked]>
Date: Wed, 25 Oct 2000 00:35:11 -0230 (NDT)

Hello,

Can I bind a key a keystroke such as CTRL-ALT-F1 to a single key so that
when for example I press the Menu key I am taken to the Linux text
console?

Thanks,

Neil

--
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: "Thomas A. Gardiner" <[email-masked]>
Date: Wed, 25 Oct 2000 10:04:32 -0400 (EDT)

Why not just bind the menu key?

If the config. file /etc/X11/XF86Config has the keyboard set for

   XkbModel        "pc105"

(My point for mentioning this is that at work I have a 105 key keyboard
but the config file had "pc101" and the Menu key was not seen.)

then this works for me...

Key Menu        A       N       Popup "MenuFvwmRoot"

though I guess you'd want Exec ...

Tom

---

From: Dan Espen <[email-masked]>
Date: Wed, 25 Oct 2000 10:25:17 -0400

> though I guess you'd want Exec ...

I don't think he wants exec, he's trying to generate keystrokes
that are handled by the Linux kernel (I believe).

Neil, I think you are asking this question on the wrong list.
I don't know the right one, but I'm pretty sure this is Linux kernel
stuff.  Even if fvwm did support generating synthetic keystrokes, I don't
think the kernel would see them.

CTRL-ALT-F1 works even when the x server isn't active.

--
Dan Espen
444 Hoes Lane  Room RRC 1C-214           E-mail: [email-masked]
Piscataway, NJ 08854                     Phone: (732) 699-5570
--
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: Michael Han <[email-masked]>
Date: Wed, 25 Oct 2000 08:01:17 -0700

> CTRL-ALT-F1 works even when the x server isn't active.

Correction, ALT/META-F1 works in the standard linux console. XFree86
supports the CTRL-ALT-F1 key binding. You'd need to hack XFree86 to
get additional tty-switching capability, since XFree86 only supports
turning the existing CTRL-ALT-Fn bindings on and off. Neil might want
to look at the xfree86 mailing lists.
-- 
[email-masked]                            http://www.mikehan.com/
coffee achiever                              San Francisco, California
"I was thinking of the immortal words of Socrates, who said, "I drank
what?" - Chris Knight
--
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: Dan Espen <[email-masked]>
Date: Wed, 25 Oct 2000 11:14:04 -0400

> to look at the xfree86 mailing lists.

My PC keyboard doesn't have a META key.

I can switch between consoles with C-A-Fn without XFree86 running.

---

From: Erik Steffl <[email-masked]>
Date: Wed, 25 Oct 2000 08:25:44 -0700

there is a program called chvt (IIRC) that you can use to switch
virtual consoles, bind a key to that program (or is it the other way
around?)

  see man fvwm on how to bind the key (I guess you would use Exec)

	erik

---

From: "Thomas A. Gardiner" <[email-masked]>
Date: Wed, 25 Oct 2000 11:44:03 -0400 (EDT)

Thanks Dan,

I must have been sleeping still...

Tom

---

From: Neil Zanella <[email-masked]>
Date: Wed, 25 Oct 2000 20:17:49 -0230 (NDT)

> but the config file had "pc101" and the Menu key was not seen.)

I used xkeycaps to configure my keyboard so my Menu key works fine.
Did I do the right thing?

> though I guess you'd want Exec ...

I want fvwm to press CTRL-ALT-F1 for me when I press the Menu key.
I don't want a menu to pop up.

Thanks,

Neil

---

From: Neil Zanella <[email-masked]>
Date: Wed, 25 Oct 2000 20:20:46 -0230 (NDT)

> think the kernel would see them.

I am not very familiar with X Window technology intrinsics but I don't
see why it would not b possible. I thought X was such a complicated
beast that it would allow virtually everything.

Thanks,

Neil

---

From: Neil Zanella <[email-masked]>
Date: Wed, 25 Oct 2000 20:32:02 -0230 (NDT)

On Wed, 25 Oct 2000, Erik Steffl wrote:

> See man fvwm on how to bind the key (I guess you would use Exec)

Exec CTRL-ALT-F1 ?

How's that supposed to work?

Thanks,

Neil

---

From: Neil Zanella <[email-masked]>
Date: Wed, 25 Oct 2000 20:30:17 -0230 (NDT)

> My PC keyboard doesn't have a META key.

The Menu key is not a META key. There are three keys that appeared on
common keyboards since the advent of MS-Win. These are the left meta
key, the right meta key, and the menu key. The meta keys are the one
with the windows logos on them. The menu key usually has a paper and
a pointer on it. For all I care it would be nice if it were even possible
to generate CTRL-ALT-F1 with some other key (such as F10).

Regards,

Neil

---

From: Neil Zanella <[email-masked]>
Date: Wed, 25 Oct 2000 20:26:46 -0230 (NDT)

> to look at the xfree86 mailing lists.

In MS-Windows you can go to real DOS mode by selecting and entry from the
task bar and clicking a button. Wouldn't it be nice if we could switch
to the Linux console in a similar fashion, perhaps with FvwmTaskBar and
FvwmForm + whatever needs to be done to generate synthetic keystrokes.
There seems to be a problem with getting window managers to generate
synthetic keystrokes and synthetic mouse clicks. It would be nice to
know how this could be done.

Regards,

Neil

---

From: Erik Steffl <[email-masked]>
Date: Wed, 25 Oct 2000 17:04:37 -0700

no, ignore the ctrl-alt-f1, use program chvt that does the same thing,
bind that program to menu key...

  see your fvwm config (probably ~/.fvwm2rc, but might be something
else) to see examples (probably) of key binding, just add one that would
bind pressing of the menu key to program chvt with appropriate argument.

	erik

---

From: Erik Steffl <[email-masked]>
Date: Wed, 25 Oct 2000 17:40:52 -0700

use chvt to switch to text virtual console, there is no need to
generate keystrokes (in this case)

  also, why is xterm not good enough?

	erik

---

From: Dan Espen <[email-masked]>
Date: Wed, 25 Oct 2000 20:59:55 -0400

> beast that it would allow virtually everything.

I don't see your reasoning.  Just because X is complicated, it doesn't
mean that it does everything.

My statement was that if you generated the synthetic keystroke C-A-F1,
it would never get to the VT driver that normally intercepts C-A-F1
and cause the action you are looking for.
I still think thats a correct statement.

Erik identified chvt as the name of a program that does communicate
with the VT driver so I would guess that you can use that program
to do everything you want.

The subject of having fvwm generate synthetic keystrokes comes up
from time to time.  Someday fvwm may do that.  It could be in the
core fvwm, or in a module.  I don't know what the advantage to building
it into fvwm would be though, it would be just as easy to have
an external program do it.  You could pass the program the window
ID and the keystroke you wanted, something like:

Exec unidentifiedProgram -w $w '^C ^[ k'

---

From: Neil Zanella <[email-masked]>
Date: Thu, 26 Oct 2000 01:21:56 -0230 (NDT)

Thanks for telling me about the chvt program which I was not aware of.
Now everything makes sense except for you need to be root to run chvt.

Thanks,

Neil

---

From: Erik Steffl <[email-masked]>
Date: Wed, 25 Oct 2000 21:12:00 -0700

hmmm... that's annoying,

  you can use sudo (see man sudo) to allow certain users to execute
chvt...

	erik

---

From: Andre Bonhote <[email-masked]>
Date: Thu, 26 Oct 2000 20:48:56 +0200

hi there!

does anybody know where to submit screenshots? i have some nice ones of
2.3.21 ...

thanks

andré

---

From: Dan Espen <[email-masked]>
Date: Thu, 26 Oct 2000 13:10:33 -0400

> does anybody know where to submit screenshots? i have some nice ones of

Send them to [email-masked].  I'm assuming that you want to add
one to http://www.fvwm.org/screenshots/index.html.

We can deal with the thumbnail, but include any text you would like
to appear.