Hello, Gentoo.

On Wed, Oct 21, 2015 at 03:51:43PM +0000, Alan Mackenzie wrote:
> The two keyboard layouts I use in XFCE are both fine and dandy, but they
> are incomplete.  In particular, I want the key combination
> <Ctrl><Alt><shift><F1> to take me to tty13 in the same way that
> <Ctrl><Alt><F1> takes me to tty1.

> I've been searching for _hours_ trying to find out how to do this.  I
> cannot find the keyboard layouts anywhere under /usr/share, where one
> might expect them.  I can't find any relevant programs to manipulate
> these data files with, even if I could find them.

> Would somebody help me please.  Where are the X keyboard layouts stored,
> and what program to I need to enhance them?

> TIA!

Well, I've nailed it, but it took me the best part of two days.  The X
keyboard setup, called xkb, is much more complicated than that for the
virtual terminal, probably needlessly.  I can't see what this extra
complexity gains.

Three files needed amending, they being under /usr/share/X11/xkb:

1: /usr/share/X11/xkb/symbols/srvr_ctrl, where the actions for the Fn
keys are defined.  They were defined as being of type "CTRL+ALT" which
allowed Fn to be pressed together with any combination of <shift> and
<AltGr>, together with <Ctrl>-<Alt>-Fn.  This involved replacing the
type with a new type "CTRL+ALT+SHIFT", which had to be defined in ....

2: /usr/share/X11/xkb/types/pc.  The new type "CTRL+ALT+SHIFT" was easy
enough to clone from "CTRL+ALT", then amend.

3: /usr/share/X11/xkb/compat/xfree86.  In this file, wierdly classified
"compatibility" (i.e. action) settings are made.  Here it was necessary
to realise that "XF86_Switch_VT_1", etc, were, intrinsically, symbols
without a specific meaning.  Only an entry in this file actually made
XF86_Switch_VT_1 do anything.  Having grasped this, it was necessary to
use other otherwise meaningless symbols for the action "go to terminal
13", etc.  F13, F14, ..., F24 happened to be defined, and they worked.

Phew!  Thank goodness for the tutorials I managed to find online.  The
one that was most useful was at
<http://www.charvolant.org/~doug/xkb/html/index.html>.

So all I've got to do now is make a patch and put it into
/etc/portage/patches so that I won't lose the changes at the next update
of xkb.

> -- 
> Alan Mackenzie (Nuremberg, Germany).

Reply via email to