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
> 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
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
>>> 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
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
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.