Gentoo Archives: gentoo-user

From: Marc Joliet <marcec@×××.de>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] How do I change an X keyboard layout?
Date: Thu, 22 Oct 2015 10:55:27
Message-Id: 7859175.a3D6migec0@thetick
In Reply to: Re: [gentoo-user] How do I change an X keyboard layout? by Alan Mackenzie
1 On Thursday 22 October 2015 10:09:11 Alan Mackenzie wrote:
2 >Hello, Marc.
3 >
4 >On Wed, Oct 21, 2015 at 09:21:07PM +0200, Marc Joliet wrote:
5 >> On Wednesday 21 October 2015 15:51:43 Alan Mackenzie wrote:
6 >> >The two keyboard layouts I use in XFCE are both fine and dandy, but they
7 >> >are incomplete. In particular, I want the key combination
8 >> ><Ctrl><Alt><shift><F1> to take me to tty13 in the same way that
9 >> ><Ctrl><Alt><F1> takes me to tty1.
10 >> >
11 >> >I've been searching for _hours_ trying to find out how to do this. I
12 >> >cannot find the keyboard layouts anywhere under /usr/share, where one
13 >> >might expect them. I can't find any relevant programs to manipulate
14 >> >these data files with, even if I could find them.
15 >> >
16 >> >Would somebody help me please. Where are the X keyboard layouts stored,
17 >> >and what program to I need to enhance them?
18 >> >
19 >> >TIA!
20 >>
21 >> I was curious, so I looked a bit myself, and found this:
22 >>
23 >> % ag ctrl-alt-f /usr/share/doc
24 >> /usr/share/doc/kbd-1.15.5-r1/html/kbd.FAQ-7.html
25 >> 21:<P>By default, console switching is done using Alt-Fn or Ctrl-Alt-Fn.
26 >> 22:Under <CODE>X</CODE> (or recent versions of <CODE>dosemu</CODE>), only
27 >> Ctrl-Alt-Fn works.
28 >>
29 >> /usr/share/doc/kbd-1.15.5-r1/html/kbd.FAQ-8.html
30 >> 54:Console_n Alt-Fn and Ctrl-Alt-Fn (1 &lt;= n &lt;= 12)
31 >> 82:Ctrl-Alt-Fn Switch to VT n
32 >> 115:Ctrl-Alt-Fn Switch to VT n (from version 0.50; earlier Alt-Fn)
33 >>
34 >> /usr/share/doc/kbd-1.15.5-r1/html/kbd.FAQ-13.html
35 >> 28:While it is running one can use Ctrl-Alt-Fn to switch to VTn.
36 >>
37 >> /usr/share/doc/kbd-1.15.5-r1/html/kbd.FAQ-9.html
38 >> 41:However, Ctrl-Alt-Fn will work and you can go to another VT.
39 >>
40 >> /usr/share/doc/libsdl-1.2.15-r9/html/docs.html
41 >> 631: The framebuffer console now uses CTRL-ALT-FN to switch virtual
42 >> terminals, to avoid collisions with application key bindings.
43 >>
44 >> (Online here: http://kbd-project.org/www.win.tue.nl/~aeb/linux/kbd/)
45 >
46 >Yes, I've got that file. It only really deals with the console
47 >keyboard, though.
48
49 Too bad, I was hoping that there might be a way of modifying the relevant X
50 key bindings.
51
52 >> (For those who haven't heard of it: ag is from
53 >> sys-apps/the_silver_searcher.)
54 >>
55 >> From a cursory look, I couldn't find anything specific, other than that
56 >> apparently AltGr+Fn is supposed to give you console n+12 (though apparently
57 >> not from within X), but it didn't work for me, and I'm not in the mood to
58 >> find out why. Also, that FAQ looks... dated. However, maybe it will help
59 >> lead you to a solution?
60 >
61 >I think I'm going to have to exercise my meagre search engine skills.
62 >
63 >> Also, while I'm sure you've got a good reason for doing this, I'm really
64 >> curious: why not use screen or tmux instead? Especially if you're dealing
65 >> with more than twelve terminals.
66 >
67 >I've never really considered screen (or tmux). Screen looks like a way
68 >of "windowising" a tty, amongst other things, which isn't what I want.
69 >In fact, reading the Wikipedia article, I'm not even clear whether
70 >screen runs on a virtual terminal or within X.
71
72 (Note: personally, I recommend tmux over screen, unless you fall into one of
73 the niches that only screen supports.)
74
75 As Alan said, they are normal programs that run in a shell. You can access
76 their sessions from X, a linux console, and/or SSH simultaneously (tmux
77 shrinks the view to the lowest common denominator automatically, e.g., to the
78 size of a laptop screen). You can split windows (much like Vim; tmux has Vi
79 key bindings, BTW), interactively select windows, scroll back and search
80 through a buffer, etc. pp..
81
82 I find it much superior to dealing with "physical" terminals (at least
83 exclusively).
84
85 (Oh, and you can detach from a session and let it run in the background
86 without staying logged in, i.e., tmux and screen can daemonize.)
87
88 >No, what I really want is a way to go from X (XFCE for me) directly to
89 >any virtual terminal. At the moment, if I want to go to, say, tty14,
90 >I've first got to go to a lower numbered tty, and then to tty14. It's
91 >one of these little annoyances which is scarcely worth bothering about,
92 >but it _is_ an annoyance.
93
94 If that's what you really want, then that's fine, I just wanted to present an
95 alternative.
96
97 >I'll continue searching.
98
99 Best of luck!
100
101 >Thanks for the post!
102 >
103 >> HTH
104
105 HTH
106 --
107 Marc Joliet
108 --
109 "People who think they know everything really annoy those of us who know we
110 don't" - Bjarne Stroustrup

Attachments

File name MIME type
signature.asc application/pgp-signature