* [gentoo-user] How do I change an X keyboard layout?
@ 2015-10-21 15:51 Alan Mackenzie
2015-10-21 19:21 ` Marc Joliet
2015-10-22 20:25 ` Alan Mackenzie
0 siblings, 2 replies; 7+ messages in thread
From: Alan Mackenzie @ 2015-10-21 15:51 UTC (permalink / raw
To: gentoo-user
Hello, Gentoo.
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!
--
Alan Mackenzie (Nuremberg, Germany).
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [gentoo-user] How do I change an X keyboard layout?
2015-10-21 15:51 [gentoo-user] How do I change an X keyboard layout? Alan Mackenzie
@ 2015-10-21 19:21 ` Marc Joliet
2015-10-22 10:09 ` Alan Mackenzie
2015-10-22 20:25 ` Alan Mackenzie
1 sibling, 1 reply; 7+ messages in thread
From: Marc Joliet @ 2015-10-21 19:21 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 2490 bytes --]
On Wednesday 21 October 2015 15:51:43 Alan Mackenzie wrote:
>Hello, Gentoo.
>
>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!
I was curious, so I looked a bit myself, and found this:
% ag ctrl-alt-f /usr/share/doc
/usr/share/doc/kbd-1.15.5-r1/html/kbd.FAQ-7.html
21:<P>By default, console switching is done using Alt-Fn or Ctrl-Alt-Fn.
22:Under <CODE>X</CODE> (or recent versions of <CODE>dosemu</CODE>), only
Ctrl-Alt-Fn works.
/usr/share/doc/kbd-1.15.5-r1/html/kbd.FAQ-8.html
54:Console_n Alt-Fn and Ctrl-Alt-Fn (1 <= n <= 12)
82:Ctrl-Alt-Fn Switch to VT n
115:Ctrl-Alt-Fn Switch to VT n (from version 0.50; earlier Alt-Fn)
/usr/share/doc/kbd-1.15.5-r1/html/kbd.FAQ-13.html
28:While it is running one can use Ctrl-Alt-Fn to switch to VTn.
/usr/share/doc/kbd-1.15.5-r1/html/kbd.FAQ-9.html
41:However, Ctrl-Alt-Fn will work and you can go to another VT.
/usr/share/doc/libsdl-1.2.15-r9/html/docs.html
631: The framebuffer console now uses CTRL-ALT-FN to switch virtual
terminals, to avoid collisions with application key bindings.
(Online here: http://kbd-project.org/www.win.tue.nl/~aeb/linux/kbd/)
(For those who haven't heard of it: ag is from sys-apps/the_silver_searcher.)
From a cursory look, I couldn't find anything specific, other than that
apparently AltGr+Fn is supposed to give you console n+12 (though apparently
not from within X), but it didn't work for me, and I'm not in the mood to find
out why. Also, that FAQ looks... dated. However, maybe it will help lead you
to a solution?
Also, while I'm sure you've got a good reason for doing this, I'm really
curious: why not use screen or tmux instead? Especially if you're dealing
with more than twelve terminals.
HTH
--
Marc Joliet
--
"People who think they know everything really annoy those of us who know we
don't" - Bjarne Stroustrup
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [gentoo-user] How do I change an X keyboard layout?
2015-10-21 19:21 ` Marc Joliet
@ 2015-10-22 10:09 ` Alan Mackenzie
2015-10-22 10:15 ` Alan McKinnon
2015-10-22 10:55 ` Marc Joliet
0 siblings, 2 replies; 7+ messages in thread
From: Alan Mackenzie @ 2015-10-22 10:09 UTC (permalink / raw
To: gentoo-user
Hello, Marc.
On Wed, Oct 21, 2015 at 09:21:07PM +0200, Marc Joliet wrote:
> On Wednesday 21 October 2015 15:51:43 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!
> I was curious, so I looked a bit myself, and found this:
> % ag ctrl-alt-f /usr/share/doc
> /usr/share/doc/kbd-1.15.5-r1/html/kbd.FAQ-7.html
> 21:<P>By default, console switching is done using Alt-Fn or Ctrl-Alt-Fn.
> 22:Under <CODE>X</CODE> (or recent versions of <CODE>dosemu</CODE>), only
> Ctrl-Alt-Fn works.
> /usr/share/doc/kbd-1.15.5-r1/html/kbd.FAQ-8.html
> 54:Console_n Alt-Fn and Ctrl-Alt-Fn (1 <= n <= 12)
> 82:Ctrl-Alt-Fn Switch to VT n
> 115:Ctrl-Alt-Fn Switch to VT n (from version 0.50; earlier Alt-Fn)
> /usr/share/doc/kbd-1.15.5-r1/html/kbd.FAQ-13.html
> 28:While it is running one can use Ctrl-Alt-Fn to switch to VTn.
> /usr/share/doc/kbd-1.15.5-r1/html/kbd.FAQ-9.html
> 41:However, Ctrl-Alt-Fn will work and you can go to another VT.
> /usr/share/doc/libsdl-1.2.15-r9/html/docs.html
> 631: The framebuffer console now uses CTRL-ALT-FN to switch virtual
> terminals, to avoid collisions with application key bindings.
> (Online here: http://kbd-project.org/www.win.tue.nl/~aeb/linux/kbd/)
Yes, I've got that file. It only really deals with the console
keyboard, though.
> (For those who haven't heard of it: ag is from sys-apps/the_silver_searcher.)
> From a cursory look, I couldn't find anything specific, other than that
> apparently AltGr+Fn is supposed to give you console n+12 (though apparently
> not from within X), but it didn't work for me, and I'm not in the mood to find
> out why. Also, that FAQ looks... dated. However, maybe it will help lead you
> to a solution?
I think I'm going to have to exercise my meagre search engine skills.
> Also, while I'm sure you've got a good reason for doing this, I'm really
> curious: why not use screen or tmux instead? Especially if you're dealing
> with more than twelve terminals.
I've never really considered screen (or tmux). Screen looks like a way
of "windowising" a tty, amongst other things, which isn't what I want.
In fact, reading the Wikipedia article, I'm not even clear whether
screen runs on a virtual terminal or within X.
No, what I really want is a way to go from X (XFCE for me) directly to
any virtual terminal. At the moment, if I want to go to, say, tty14,
I've first got to go to a lower numbered tty, and then to tty14. It's
one of these little annoyances which is scarcely worth bothering about,
but it _is_ an annoyance.
I'll continue searching.
Thanks for the post!
> HTH
> --
> Marc Joliet
--
Alan Mackenzie (Nuremberg, Germany).
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [gentoo-user] How do I change an X keyboard layout?
2015-10-22 10:09 ` Alan Mackenzie
@ 2015-10-22 10:15 ` Alan McKinnon
2015-10-22 10:55 ` Marc Joliet
1 sibling, 0 replies; 7+ messages in thread
From: Alan McKinnon @ 2015-10-22 10:15 UTC (permalink / raw
To: gentoo-user
On 22/10/2015 12:09, Alan Mackenzie wrote:
> Hello, Marc.
>
> On Wed, Oct 21, 2015 at 09:21:07PM +0200, Marc Joliet wrote:
>> On Wednesday 21 October 2015 15:51:43 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!
>
>> I was curious, so I looked a bit myself, and found this:
>
>> % ag ctrl-alt-f /usr/share/doc
>> /usr/share/doc/kbd-1.15.5-r1/html/kbd.FAQ-7.html
>> 21:<P>By default, console switching is done using Alt-Fn or Ctrl-Alt-Fn.
>> 22:Under <CODE>X</CODE> (or recent versions of <CODE>dosemu</CODE>), only
>> Ctrl-Alt-Fn works.
>
>> /usr/share/doc/kbd-1.15.5-r1/html/kbd.FAQ-8.html
>> 54:Console_n Alt-Fn and Ctrl-Alt-Fn (1 <= n <= 12)
>> 82:Ctrl-Alt-Fn Switch to VT n
>> 115:Ctrl-Alt-Fn Switch to VT n (from version 0.50; earlier Alt-Fn)
>
>> /usr/share/doc/kbd-1.15.5-r1/html/kbd.FAQ-13.html
>> 28:While it is running one can use Ctrl-Alt-Fn to switch to VTn.
>
>> /usr/share/doc/kbd-1.15.5-r1/html/kbd.FAQ-9.html
>> 41:However, Ctrl-Alt-Fn will work and you can go to another VT.
>
>> /usr/share/doc/libsdl-1.2.15-r9/html/docs.html
>> 631: The framebuffer console now uses CTRL-ALT-FN to switch virtual
>> terminals, to avoid collisions with application key bindings.
>
>> (Online here: http://kbd-project.org/www.win.tue.nl/~aeb/linux/kbd/)
>
> Yes, I've got that file. It only really deals with the console
> keyboard, though.
>
>> (For those who haven't heard of it: ag is from sys-apps/the_silver_searcher.)
>
>> From a cursory look, I couldn't find anything specific, other than that
>> apparently AltGr+Fn is supposed to give you console n+12 (though apparently
>> not from within X), but it didn't work for me, and I'm not in the mood to find
>> out why. Also, that FAQ looks... dated. However, maybe it will help lead you
>> to a solution?
>
> I think I'm going to have to exercise my meagre search engine skills.
>
>> Also, while I'm sure you've got a good reason for doing this, I'm really
>> curious: why not use screen or tmux instead? Especially if you're dealing
>> with more than twelve terminals.
>
> I've never really considered screen (or tmux). Screen looks like a way
> of "windowising" a tty, amongst other things, which isn't what I want.
> In fact, reading the Wikipedia article, I'm not even clear whether
> screen runs on a virtual terminal or within X.
Neither. screen runs in a shell, and the output goes to whatever the
shell is using for that. Same as bash, ssh and so on all do - display
device agnostic.
>
> No, what I really want is a way to go from X (XFCE for me) directly to
> any virtual terminal. At the moment, if I want to go to, say, tty14,
> I've first got to go to a lower numbered tty, and then to tty14. It's
> one of these little annoyances which is scarcely worth bothering about,
> but it _is_ an annoyance.
>
> I'll continue searching.
>
> Thanks for the post!
>
>> HTH
>> --
>> Marc Joliet
>
--
Alan McKinnon
alan.mckinnon@gmail.com
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [gentoo-user] How do I change an X keyboard layout?
2015-10-22 10:09 ` Alan Mackenzie
2015-10-22 10:15 ` Alan McKinnon
@ 2015-10-22 10:55 ` Marc Joliet
1 sibling, 0 replies; 7+ messages in thread
From: Marc Joliet @ 2015-10-22 10:55 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 4555 bytes --]
On Thursday 22 October 2015 10:09:11 Alan Mackenzie wrote:
>Hello, Marc.
>
>On Wed, Oct 21, 2015 at 09:21:07PM +0200, Marc Joliet wrote:
>> On Wednesday 21 October 2015 15:51:43 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!
>>
>> I was curious, so I looked a bit myself, and found this:
>>
>> % ag ctrl-alt-f /usr/share/doc
>> /usr/share/doc/kbd-1.15.5-r1/html/kbd.FAQ-7.html
>> 21:<P>By default, console switching is done using Alt-Fn or Ctrl-Alt-Fn.
>> 22:Under <CODE>X</CODE> (or recent versions of <CODE>dosemu</CODE>), only
>> Ctrl-Alt-Fn works.
>>
>> /usr/share/doc/kbd-1.15.5-r1/html/kbd.FAQ-8.html
>> 54:Console_n Alt-Fn and Ctrl-Alt-Fn (1 <= n <= 12)
>> 82:Ctrl-Alt-Fn Switch to VT n
>> 115:Ctrl-Alt-Fn Switch to VT n (from version 0.50; earlier Alt-Fn)
>>
>> /usr/share/doc/kbd-1.15.5-r1/html/kbd.FAQ-13.html
>> 28:While it is running one can use Ctrl-Alt-Fn to switch to VTn.
>>
>> /usr/share/doc/kbd-1.15.5-r1/html/kbd.FAQ-9.html
>> 41:However, Ctrl-Alt-Fn will work and you can go to another VT.
>>
>> /usr/share/doc/libsdl-1.2.15-r9/html/docs.html
>> 631: The framebuffer console now uses CTRL-ALT-FN to switch virtual
>> terminals, to avoid collisions with application key bindings.
>>
>> (Online here: http://kbd-project.org/www.win.tue.nl/~aeb/linux/kbd/)
>
>Yes, I've got that file. It only really deals with the console
>keyboard, though.
Too bad, I was hoping that there might be a way of modifying the relevant X
key bindings.
>> (For those who haven't heard of it: ag is from
>> sys-apps/the_silver_searcher.)
>>
>> From a cursory look, I couldn't find anything specific, other than that
>> apparently AltGr+Fn is supposed to give you console n+12 (though apparently
>> not from within X), but it didn't work for me, and I'm not in the mood to
>> find out why. Also, that FAQ looks... dated. However, maybe it will help
>> lead you to a solution?
>
>I think I'm going to have to exercise my meagre search engine skills.
>
>> Also, while I'm sure you've got a good reason for doing this, I'm really
>> curious: why not use screen or tmux instead? Especially if you're dealing
>> with more than twelve terminals.
>
>I've never really considered screen (or tmux). Screen looks like a way
>of "windowising" a tty, amongst other things, which isn't what I want.
>In fact, reading the Wikipedia article, I'm not even clear whether
>screen runs on a virtual terminal or within X.
(Note: personally, I recommend tmux over screen, unless you fall into one of
the niches that only screen supports.)
As Alan said, they are normal programs that run in a shell. You can access
their sessions from X, a linux console, and/or SSH simultaneously (tmux
shrinks the view to the lowest common denominator automatically, e.g., to the
size of a laptop screen). You can split windows (much like Vim; tmux has Vi
key bindings, BTW), interactively select windows, scroll back and search
through a buffer, etc. pp..
I find it much superior to dealing with "physical" terminals (at least
exclusively).
(Oh, and you can detach from a session and let it run in the background
without staying logged in, i.e., tmux and screen can daemonize.)
>No, what I really want is a way to go from X (XFCE for me) directly to
>any virtual terminal. At the moment, if I want to go to, say, tty14,
>I've first got to go to a lower numbered tty, and then to tty14. It's
>one of these little annoyances which is scarcely worth bothering about,
>but it _is_ an annoyance.
If that's what you really want, then that's fine, I just wanted to present an
alternative.
>I'll continue searching.
Best of luck!
>Thanks for the post!
>
>> HTH
HTH
--
Marc Joliet
--
"People who think they know everything really annoy those of us who know we
don't" - Bjarne Stroustrup
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [gentoo-user] How do I change an X keyboard layout?
2015-10-21 15:51 [gentoo-user] How do I change an X keyboard layout? Alan Mackenzie
2015-10-21 19:21 ` Marc Joliet
@ 2015-10-22 20:25 ` Alan Mackenzie
2015-10-23 8:52 ` Peter Humphrey
1 sibling, 1 reply; 7+ messages in thread
From: Alan Mackenzie @ 2015-10-22 20:25 UTC (permalink / raw
To: gentoo-user
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).
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [gentoo-user] How do I change an X keyboard layout?
2015-10-22 20:25 ` Alan Mackenzie
@ 2015-10-23 8:52 ` Peter Humphrey
0 siblings, 0 replies; 7+ messages in thread
From: Peter Humphrey @ 2015-10-23 8:52 UTC (permalink / raw
To: gentoo-user
On Thursday 22 October 2015 20:25:51 Alan Mackenzie wrote:
--->8
> 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.
...or add those file names to CONFIG_PROTECT in make.conf. Then you'll be
invited to etc-update them when xkb changes.
--
Rgds
Peter
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2015-10-23 8:52 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-21 15:51 [gentoo-user] How do I change an X keyboard layout? Alan Mackenzie
2015-10-21 19:21 ` Marc Joliet
2015-10-22 10:09 ` Alan Mackenzie
2015-10-22 10:15 ` Alan McKinnon
2015-10-22 10:55 ` Marc Joliet
2015-10-22 20:25 ` Alan Mackenzie
2015-10-23 8:52 ` Peter Humphrey
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox