unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Re: 07/07: services: console-keymap: Deprecate.
       [not found] ` <20190405134516.BD1962158A@vcs0.savannah.gnu.org>
@ 2019-04-06  1:45   ` Mark H Weaver
  2019-04-06 19:51     ` Alex Kost
  0 siblings, 1 reply; 7+ messages in thread
From: Mark H Weaver @ 2019-04-06  1:45 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel

Hi Ludovic,

guix-commits@gnu.org writes:

> civodul pushed a commit to branch master
> in repository guix.
>
> commit 3a665637afc32a142dc24a77ce7ce9235eb6a3af
> Author: Ludovic Courtès <ludo@gnu.org>
> Date:   Wed Apr 3 14:32:41 2019 +0200
>
>     services: console-keymap: Deprecate.
>     
>     * gnu/services/base.scm (console-keymap-service): Mark as deprecated.
>     * doc/guix.texi (Base Services): Remove its documentation.

Why is this being deprecated?  Is there an alternative service to
replace it?

I use this service to change my console keymap, changing Caps Lock to
Control, and adding several more mappings for Meta-key combinations to
make Emacs more pleasurable to use from a text console.

       Mark

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: 07/07: services: console-keymap: Deprecate.
  2019-04-06  1:45   ` 07/07: services: console-keymap: Deprecate Mark H Weaver
@ 2019-04-06 19:51     ` Alex Kost
  2019-04-07 16:24       ` Ludovic Courtès
  0 siblings, 1 reply; 7+ messages in thread
From: Alex Kost @ 2019-04-06 19:51 UTC (permalink / raw)
  To: Mark H Weaver; +Cc: guix-devel

Mark H Weaver (2019-04-05 21:45 -0400) wrote:

> Hi Ludovic,
>
> guix-commits@gnu.org writes:
>
>> civodul pushed a commit to branch master
>> in repository guix.
>>
>> commit 3a665637afc32a142dc24a77ce7ce9235eb6a3af
>> Author: Ludovic Courtès <ludo@gnu.org>
>> Date:   Wed Apr 3 14:32:41 2019 +0200
>>
>>     services: console-keymap: Deprecate.
>>     
>>     * gnu/services/base.scm (console-keymap-service): Mark as deprecated.
>>     * doc/guix.texi (Base Services): Remove its documentation.
>
> Why is this being deprecated?

Ouch, this is unpleasant surprise.

> Is there an alternative service to replace it?

I wonder too!  I see there is a new ‘keyboard-layout’ field, but if I
understand (gnu system keyboard) correctly, it does not allow me to use
my own file in "loadkeys" format.

> I use this service to change my console keymap, changing Caps Lock to
> Control, and adding several more mappings for Meta-key combinations to
> make Emacs more pleasurable to use from a text console.

-- 
Alex

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: 07/07: services: console-keymap: Deprecate.
  2019-04-06 19:51     ` Alex Kost
@ 2019-04-07 16:24       ` Ludovic Courtès
  2019-04-11 19:04         ` Alex Kost
  2019-04-12  2:00         ` Mark H Weaver
  0 siblings, 2 replies; 7+ messages in thread
From: Ludovic Courtès @ 2019-04-07 16:24 UTC (permalink / raw)
  To: Alex Kost; +Cc: guix-devel

Hi Mark & Alex,

Alex Kost <alezost@gmail.com> skribis:

> Mark H Weaver (2019-04-05 21:45 -0400) wrote:
>
>> Hi Ludovic,
>>
>> guix-commits@gnu.org writes:
>>
>>> civodul pushed a commit to branch master
>>> in repository guix.
>>>
>>> commit 3a665637afc32a142dc24a77ce7ce9235eb6a3af
>>> Author: Ludovic Courtès <ludo@gnu.org>
>>> Date:   Wed Apr 3 14:32:41 2019 +0200
>>>
>>>     services: console-keymap: Deprecate.
>>>     
>>>     * gnu/services/base.scm (console-keymap-service): Mark as deprecated.
>>>     * doc/guix.texi (Base Services): Remove its documentation.
>>
>> Why is this being deprecated?
>
> Ouch, this is unpleasant surprise.

For the record I submitted it here:
<https://issues.guix.info/issue/35120>.

>> Is there an alternative service to replace it?
>
> I wonder too!  I see there is a new ‘keyboard-layout’ field, but if I
> understand (gnu system keyboard) correctly, it does not allow me to use
> my own file in "loadkeys" format.

As you found out, this is deprecated in favor of ‘keyboard-layout’,
which has a couple of advantages: it’s uniform (the same config works
for GRUB, Linux, and Xorg), and it’s installed from the initrd, so
already effective when you type in your passphrase (see
<https://issues.guix.info/issue/34929>).

‘keyboard-layout’ definitely works for what you describe, Mark (see the
examples in the manual.)

If you do fancy things with Linux-native keymap files, Alex, it’s
probably not for you.  In that case you do need
‘console-keymap-service’.

However, I was thinking that we probably want to steer users towards the
‘keyboard-layout’ mechanism so they don’t experience the inconsistencies
we had before.  That’s why I deprecated ‘console-keymap-service’.  I’d
argue that keymap experts won’t have difficulties coming up with a
‘console-keymap-service’ if they need it.

WDYT?

Ludo’.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: 07/07: services: console-keymap: Deprecate.
  2019-04-07 16:24       ` Ludovic Courtès
@ 2019-04-11 19:04         ` Alex Kost
  2019-04-12 21:01           ` Ludovic Courtès
  2019-04-12  2:00         ` Mark H Weaver
  1 sibling, 1 reply; 7+ messages in thread
From: Alex Kost @ 2019-04-11 19:04 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel

Ludovic Courtès (2019-04-07 18:24 +0200) wrote:

[...]
> As you found out, this is deprecated in favor of ‘keyboard-layout’,
> which has a couple of advantages: it’s uniform (the same config works
> for GRUB, Linux, and Xorg), and it’s installed from the initrd, so
> already effective when you type in your passphrase (see
> <https://issues.guix.info/issue/34929>).
>
> ‘keyboard-layout’ definitely works for what you describe, Mark (see the
> examples in the manual.)
>
> If you do fancy things with Linux-native keymap files, Alex, it’s
> probably not for you.  In that case you do need
> ‘console-keymap-service’.

The fancy thing I do is simply loading my own keymap file, like this:

  (console-keymap-service (local-file ".../my.map"))

If I understand correctly, ‘keyboard-layout’ does not allow me to do
this, right?

> However, I was thinking that we probably want to steer users towards the
> ‘keyboard-layout’ mechanism so they don’t experience the inconsistencies
> we had before.  That’s why I deprecated ‘console-keymap-service’.  I’d
> argue that keymap experts won’t have difficulties coming up with a
> ‘console-keymap-service’ if they need it.

Sure, it's not a problem for me to add ‘console-keymap-service’ to my
config, I was just surprised that some feature was removed
("deprecating" means "removing sooner or later", right?) without
replacing it with equivalent functionality (as I see it).

> WDYT?

Please do whatever seems appropriate to you.  I just think that keyboard
layouts for grub, tty and X server are completely unrelated settings,
and I don't like when such unrelated configurations are combined just to
become more "user-friendly".

-- 
Alex

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: 07/07: services: console-keymap: Deprecate.
  2019-04-07 16:24       ` Ludovic Courtès
  2019-04-11 19:04         ` Alex Kost
@ 2019-04-12  2:00         ` Mark H Weaver
  2019-04-12 21:09           ` Ludovic Courtès
  1 sibling, 1 reply; 7+ messages in thread
From: Mark H Weaver @ 2019-04-12  2:00 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel, Alex Kost

Hi Ludovic,

Ludovic Courtès <ludo@gnu.org> writes:

> Alex Kost <alezost@gmail.com> skribis:
>
>> Mark H Weaver (2019-04-05 21:45 -0400) wrote:
>>
>>> Is there an alternative service to replace it?
>>
>> I wonder too!  I see there is a new ‘keyboard-layout’ field, but if I
>> understand (gnu system keyboard) correctly, it does not allow me to use
>> my own file in "loadkeys" format.
>
> As you found out, this is deprecated in favor of ‘keyboard-layout’,
> which has a couple of advantages: it’s uniform (the same config works
> for GRUB, Linux, and Xorg), and it’s installed from the initrd, so
> already effective when you type in your passphrase (see
> <https://issues.guix.info/issue/34929>).
>
> ‘keyboard-layout’ definitely works for what you describe, Mark (see the
> examples in the manual.)

Well, I described adding custom keybindings to the console keymap, for
which I cannot find any examples in the manual.  I see only examples of
using the pre-existing layouts, variants, and options that are built in
to XKB.

On the other hand, I just found that adding:

  (keyboard-layout (keyboard-layout "us" #:options '("ctrl:nocaps")))

has the effect of adding all of the keyboard bindings that I personally
want.

For the curious: the "custom" bindings I wanted are just those that Xorg
has by default, but that are missing from the default console keyboard
map.  Most notably, I had found that many (most?) Meta+Shift keyboard
combinations did not work properly in Emacs at the console, until I
added my "custom" bindings.  However, these missing bindings are
installed when my OS config has the above 'keyboard-layout' line.

So, thank you for implementing this new keyboard configuration system,
which is clearly a great improvement over what we had before, and which
now allows me to remove rather large section of my OS config that held
my keyboard map.

On the other hand, if this new system does not support custom keymaps,
it would be good to keep the old console-keymap-service around, even if
tucked in a back room, renamed, and clearly marked "only for hackers".
However, I don't feel strongly about it.  As you say, hackers can cook
up their own private service if they need to, I suppose.

     Regards,
       Mark

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: 07/07: services: console-keymap: Deprecate.
  2019-04-11 19:04         ` Alex Kost
@ 2019-04-12 21:01           ` Ludovic Courtès
  0 siblings, 0 replies; 7+ messages in thread
From: Ludovic Courtès @ 2019-04-12 21:01 UTC (permalink / raw)
  To: Alex Kost; +Cc: guix-devel

Hi Alex,

Alex Kost <alezost@gmail.com> skribis:

> Ludovic Courtès (2019-04-07 18:24 +0200) wrote:
>
> [...]
>> As you found out, this is deprecated in favor of ‘keyboard-layout’,
>> which has a couple of advantages: it’s uniform (the same config works
>> for GRUB, Linux, and Xorg), and it’s installed from the initrd, so
>> already effective when you type in your passphrase (see
>> <https://issues.guix.info/issue/34929>).
>>
>> ‘keyboard-layout’ definitely works for what you describe, Mark (see the
>> examples in the manual.)
>>
>> If you do fancy things with Linux-native keymap files, Alex, it’s
>> probably not for you.  In that case you do need
>> ‘console-keymap-service’.
>
> The fancy thing I do is simply loading my own keymap file, like this:
>
>   (console-keymap-service (local-file ".../my.map"))
>
> If I understand correctly, ‘keyboard-layout’ does not allow me to do
> this, right?

Not directly, no.

>> However, I was thinking that we probably want to steer users towards the
>> ‘keyboard-layout’ mechanism so they don’t experience the inconsistencies
>> we had before.  That’s why I deprecated ‘console-keymap-service’.  I’d
>> argue that keymap experts won’t have difficulties coming up with a
>> ‘console-keymap-service’ if they need it.
>
> Sure, it's not a problem for me to add ‘console-keymap-service’ to my
> config, I was just surprised that some feature was removed
> ("deprecating" means "removing sooner or later", right?) without
> replacing it with equivalent functionality (as I see it).

It’s deprecated in order to be removed eventually, yes.

It’s “equivalent functionality” in the sense that it deals with keyboard
layout in the console, but it’s also a different interface.

>> WDYT?
>
> Please do whatever seems appropriate to you.  I just think that keyboard
> layouts for grub, tty and X server are completely unrelated settings,
> and I don't like when such unrelated configurations are combined just to
> become more "user-friendly".

I don’t think anyone mentioned user-friendliness, though I think
user-friendliness is a good thing.  :-)

Anyway, keyboard settings have been a longstanding issue with several
open bug reports, notably about the inconsistencies one would inevitably
go through.  This change was proposed precisely to address this problem.
Debian uses ‘console-setup’ for the same reason.

Now, that does not prevent users from configuring things separately, or
using ‘loadkeys’ directly, etc.

Thanks for your feedback,
Ludo’.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: 07/07: services: console-keymap: Deprecate.
  2019-04-12  2:00         ` Mark H Weaver
@ 2019-04-12 21:09           ` Ludovic Courtès
  0 siblings, 0 replies; 7+ messages in thread
From: Ludovic Courtès @ 2019-04-12 21:09 UTC (permalink / raw)
  To: Mark H Weaver; +Cc: guix-devel, Alex Kost

Hi Mark,

Mark H Weaver <mhw@netris.org> skribis:

> Well, I described adding custom keybindings to the console keymap, for
> which I cannot find any examples in the manual.  I see only examples of
> using the pre-existing layouts, variants, and options that are built in
> to XKB.
>
> On the other hand, I just found that adding:
>
>   (keyboard-layout (keyboard-layout "us" #:options '("ctrl:nocaps")))
>
> has the effect of adding all of the keyboard bindings that I personally
> want.

Yes, that’s the one I had in mind.

> For the curious: the "custom" bindings I wanted are just those that Xorg
> has by default, but that are missing from the default console keyboard
> map.  Most notably, I had found that many (most?) Meta+Shift keyboard
> combinations did not work properly in Emacs at the console, until I
> added my "custom" bindings.  However, these missing bindings are
> installed when my OS config has the above 'keyboard-layout' line.

Great, I’m glad this works for you.

> So, thank you for implementing this new keyboard configuration system,
> which is clearly a great improvement over what we had before, and which
> now allows me to remove rather large section of my OS config that held
> my keyboard map.
>
> On the other hand, if this new system does not support custom keymaps,
> it would be good to keep the old console-keymap-service around, even if
> tucked in a back room, renamed, and clearly marked "only for hackers".
> However, I don't feel strongly about it.  As you say, hackers can cook
> up their own private service if they need to, I suppose.

Yeah, I’m not opposed to keeping ‘console-keymap-service’ if people are
find XKB configuration too limiting.  I just don’t want it to be the
first thing newcomers stumble upon when looking for ways to configure
their keyboard.

Thanks,
Ludo’.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2019-04-12 21:10 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20190405134511.7740.88403@vcs0.savannah.gnu.org>
     [not found] ` <20190405134516.BD1962158A@vcs0.savannah.gnu.org>
2019-04-06  1:45   ` 07/07: services: console-keymap: Deprecate Mark H Weaver
2019-04-06 19:51     ` Alex Kost
2019-04-07 16:24       ` Ludovic Courtès
2019-04-11 19:04         ` Alex Kost
2019-04-12 21:01           ` Ludovic Courtès
2019-04-12  2:00         ` Mark H Weaver
2019-04-12 21:09           ` Ludovic Courtès

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).