Google Groupes n'accepte plus les nouveaux posts ni abonnements Usenet. Les contenus de l'historique resteront visibles.

How to disable Ctrl-Atl-F*

0 vue
Accéder directement au premier message non lu

Jean Blouin

non lue,
19 juin 2003, 14:27:5719/06/2003
à
Hi,

I am porting an application from another unix platform to linux which
uses Ctrl-Alt-F8 and Ctrl-Alt-F9. But on Linux these key are used to
switch to virtual console. Is there a way to disable this, and let my
application receive Ctrl-Alt-F8 and Ctrl-Alt-F9? I tried using the
following option in XF86Config

Section "ServerFlags"
Option "DontVTSwitch" "on"
EndSection

But it does not work.

I am using RedHat 8.0 with stock XFree86 Version 4.2.0.

Any help would be greatly appreciated.

Jean

Dave Uhring

non lue,
19 juin 2003, 14:31:0919/06/2003
à
On Thu, 19 Jun 2003 11:27:57 -0700, Jean Blouin wrote:

> Hi,
>
> I am porting an application from another unix platform to linux which
> uses Ctrl-Alt-F8 and Ctrl-Alt-F9. But on Linux these key are used to
> switch to virtual console. Is there a way to disable this, and let my
> application receive Ctrl-Alt-F8 and Ctrl-Alt-F9? I tried using the
> following option in XF86Config

/etc/inittab

Robt. Miller

non lue,
19 juin 2003, 17:17:4619/06/2003
à

Or if he didn't want to do without the terminals he could remap with
defkeymap.map/loadkeys.


--

(o<
//\ Powered by SuSE Linux
V_/_ Virusproof. Crashproof.
5:16pm up 17 days, 13 min, 29 users, load average: 1.24, 1.35, 1.27
processes 1523527

Dances With Crows

non lue,
19 juin 2003, 17:33:1819/06/2003
à
On Thu, 19 Jun 2003 16:17:46 -0500, Robt. Miller staggered into the
Black Sun and said:
> In article <pan.2003.06.19....@yahoo.com>, Dave Uhring
> wrote:
>> On Thu, 19 Jun 2003 11:27:57 -0700, Jean Blouin wrote:
>>> I am porting an application from another unix platform to linux
>>> which uses Ctrl-Alt-F8 and Ctrl-Alt-F9. But on Linux these key are
>>> used to switch to virtual console. Is there a way to disable this,
>>> and let my application receive Ctrl-Alt-F8 and Ctrl-Alt-F9? I tried
>>> using the following option in XF86Config

>>> Option "DontVTSwitch" "on"

Interesting.

>> /etc/inittab

Won't do anything about the OP's problem. I have nothing running on
/dev/vc/9 , but Ctrl-Alt-F9 from X switches to vc9 anyway.

> Or if he didn't want to do without the terminals he could remap with
> defkeymap.map/loadkeys.

That's only for virtual consoles, isn't it? X handles things
differently. AFAIK, Ctrl-Alt-F?, Ctrl-Alt-Plus, and Ctrl-Alt-Minus are
handled directly by the X server, and there's no way to remap these key
combinations with xmodmap or xbindkeys.

It seems odd that Ctrl-Alt-F[89] are used and F[1-7] aren't. If you're
porting this anyway, it'd probably be a better idea to reassign whatever
functions Ctrl-Alt-F[78] call to other shortcut keys.

--
Matt G|There is no Darkness in Eternity/But only Light too dim for us to see
Brainbench MVP for Linux Admin /
http://www.brainbench.com / "He is a rhythmic movement of the
-----------------------------/ penguins, is Tux." --MegaHAL

Jean Blouin

non lue,
20 juin 2003, 17:48:4320/06/2003
à
Dances With Crows <dancesw...@usa.net> wrote in message news:<slrnbf4ah0.4vt....@samantha.crow202.dyndns.org>...

> On Thu, 19 Jun 2003 16:17:46 -0500, Robt. Miller staggered into the
> Black Sun and said:
> > In article <pan.2003.06.19....@yahoo.com>, Dave Uhring
> > wrote:
> >> On Thu, 19 Jun 2003 11:27:57 -0700, Jean Blouin wrote:
> >>> I am porting an application from another unix platform to linux
> >>> which uses Ctrl-Alt-F8 and Ctrl-Alt-F9. But on Linux these key are
> >>> used to switch to virtual console. Is there a way to disable this,
> >>> and let my application receive Ctrl-Alt-F8 and Ctrl-Alt-F9? I tried
> >>> using the following option in XF86Config
>
> >>> Option "DontVTSwitch" "on"
>
> Interesting.
>
> >> /etc/inittab
>
> Won't do anything about the OP's problem. I have nothing running on
> /dev/vc/9 , but Ctrl-Alt-F9 from X switches to vc9 anyway.
>
> > Or if he didn't want to do without the terminals he could remap with
> > defkeymap.map/loadkeys.
>
> That's only for virtual consoles, isn't it? X handles things
> differently. AFAIK, Ctrl-Alt-F?, Ctrl-Alt-Plus, and Ctrl-Alt-Minus are
> handled directly by the X server, and there's no way to remap these key
> combinations with xmodmap or xbindkeys.
>
> It seems odd that Ctrl-Alt-F[89] are used and F[1-7] aren't. If you're
> porting this anyway, it'd probably be a better idea to reassign whatever
> functions Ctrl-Alt-F[78] call to other shortcut keys.

I actually found the solution I was looking for... (By looking at the
XFree86 source code...Isn't this great, I love Linux! )

I added the following to my XF86Config
Section "ServerFlags"
Option "VTSysReq" "on"
EndSection

This allow my application to use all Ctrl-Alt-F* and it remaps the
virtual console switch to Alt-SysReq-F*, which for my application does
not create any hotkey conflicts.

Thanks to all who responded.

Jean

Dances With Crows

non lue,
21 juin 2003, 10:46:5821/06/2003
à
On 20 Jun 2003 14:48:43 -0700, Jean Blouin staggered into the Black Sun

and said:
> Dances With Crows <dancesw...@usa.net> wrote in message
> news:<slrnbf4ah0.4vt....@samantha.crow202.dyndns.org>...
[snippage]

>> It seems odd that Ctrl-Alt-F[89] are used and F[1-7] aren't. If
>> you're porting this anyway, it'd probably be a better idea to
>> reassign whatever functions Ctrl-Alt-F[78] call to other shortcut
>> keys.
>
> I actually found the solution I was looking for... (By looking at the
> XFree86 source code...Isn't this great, I love Linux! )

There's always the option of looking at the source, which is great...
this should've been better-documented though. VTSysReq is actually in
the man pages in a reasonable place, unlike RenderColormapMode (see
slrnb6kb40.rjl....@samantha.crow202.dyndns.org for what that
option is and what it can be used for.)

> I added the following to my XF86Config
> Section "ServerFlags"
> Option "VTSysReq" "on"
> EndSection
>
> This allow my application to use all Ctrl-Alt-F* and it remaps the
> virtual console switch to Alt-SysReq-F*,

The XF86Config man page says this:

Option "VTSysReq" "boolean"
enables the SYSV-style VT switch sequence for non-SYSV systems
which support VT switching. This sequence is Alt-SysRq followed
by a function key (Fn). This prevents the X server trapping the
keys used for the default VT switch sequence, which means that
clients can access them. Default: off.

...if you read the entry carefully, it actually makes sense, but it's
totally non-obvious if you're reading quickly and trying to do keyword
searches. Sigh.

0 nouveau message