From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id A8E8213888F for ; Thu, 22 Oct 2015 20:24:24 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 485BC21C041; Thu, 22 Oct 2015 20:24:17 +0000 (UTC) Received: from mail.muc.de (mail.muc.de [193.149.48.3]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 02B2A21C01C for ; Thu, 22 Oct 2015 20:24:15 +0000 (UTC) Received: (qmail 47627 invoked by uid 3782); 22 Oct 2015 20:24:10 -0000 Received: from acm.muc.de (p579E986B.dip0.t-ipconnect.de [87.158.152.107]) by colin.muc.de (tmda-ofmipd) with ESMTP; Thu, 22 Oct 2015 22:24:10 +0200 Received: (qmail 11636 invoked by uid 1000); 22 Oct 2015 20:25:51 -0000 Date: Thu, 22 Oct 2015 20:25:51 +0000 To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] How do I change an X keyboard layout? Message-ID: <20151022202551.GC2645@acm.fritz.box> References: <20151021155143.GE2608@acm.fritz.box> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20151021155143.GE2608@acm.fritz.box> User-Agent: Mutt/1.5.23 (2014-03-12) X-Delivery-Agent: TMDA/1.1.12 (Macallan) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-Archives-Salt: 76eedc92-1b81-4610-9267-5b7f493c0337 X-Archives-Hash: adc7ca762c1d134c35cd6ed429e0c371 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 > to take me to tty13 in the same way that > 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 and , together with --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 . 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).