Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #267058

Re: How can we change the keyboard layout? (was: what keyboard do you use?)

From debian-user@howorth.org.uk
Newsgroups linux.debian.user
Subject Re: How can we change the keyboard layout? (was: what keyboard do you use?)
Date 2024-02-06 13:10 +0100
Message-ID <I4sr0-8hwn-9@gated-at.bofh.it> (permalink)
References (7 earlier) <I3PpD-7SNf-9@gated-at.bofh.it> <I45up-82RT-1@gated-at.bofh.it> <I48sh-84LV-11@gated-at.bofh.it> <I4drX-883T-1@gated-at.bofh.it> <I4nhD-8eb2-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Brian Sammon <debian-users-list@brisammon.fastmail.fm> wrote:
> On Mon, 05 Feb 2024 21:06:30 +0100
> hw <hw@adminart.net> wrote:
> 
> > Yes, it's a misunderstanding: How can we change the keyboard
> > layout?  
> 
> I recently dug into this because I am running Debian on a Chromebook,
> and I wanted to map the Google-key (located next to the A key, where
> you usually expect Caps-Lock to be) to be a Ctrl, for
> Emacs-Correctness.  I wanted a solution that would also work when I
> used an external keyboard (which has an actual CapsLock next to the
> A), and would work both in X and in console mode.
> 
> The solution I found, which should work when using Wayland as well,
> was to customize the lowlevel scancode-to-keycode mapping that is
> managed by udev.  You can have different remappings for different
> keyboard models.
> 
> This keymapping system is very powerful, but somewhat ideosyncratic,
> and somewhat poorly documented.  And it's an edit-the-configfile
> system; I'm not aware of any GUI config tools for it.
> 
> It took me over 2 hours to figure out and set up, after which I had a
> scrambled pile of notes (in a text file) but not the energy to clean
> them up.  The next time I do it I expect it'll take me about an hour
> (if the same process still applies) instead of the 15 minutes it
> would take if I did a proper job of documenting it for myself.
> 
> Some of the webpages in my notes that I remember being useful are:
> https://wiki.archlinux.org/title/Keyboard_input
> https://yulistic.gitlab.io/2017/12/linux-keymapping-with-udev-hwdb/
> (including some of the comments that contain more recent info)
> https://medium.com/@canadaduane/key-remapping-in-linux-2021-edition-47320999d2aa

Many, many thanks for this post Brian. Those links are truly excellent.

> Some somewhat-informative files on my computer were
> /lib/udev/hwdb.d/60-keyboard.hwdb (comes with udev)
> /usr/include/linux/input-event-codes.h (comes with linux-libc-dev
> package)
> 
> Gotchas include:
> Some things *must* be in lowercase (keycodes, I think?)
> Some things *must* be in uppercase (certain hexadecimal stuff?)
> For best results, triple-check that the case you use is exactly the
> same as the example/sample config files. If you get this wrong, udev
> will just ignore the erroneous parts of your config file, (and you
> might think it just didn't see it) instead of giving an error message.
> 

Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

what keyboard do you use? Lee <ler762@gmail.com> - 2024-02-03 02:30 +0100
  Re: what keyboard do you use? Gremlin <scott-andrews@columbus.rr.com> - 2024-02-03 02:50 +0100
    Re: what keyboard do you use? Timothy M Butterworth <timothy.m.butterworth@gmail.com> - 2024-02-03 04:00 +0100
  Re: what keyboard do you use? ghe2001 <ghe2001@protonmail.com> - 2024-02-03 03:00 +0100
  Re: what keyboard do you use? Nate Bargmann <n0nb@n0nb.us> - 2024-02-03 03:10 +0100
    Re: what keyboard do you use? Marco Moock <mm@dorfdsl.de> - 2024-02-03 08:40 +0100
    Re: what keyboard do you use? Lee <ler762@gmail.com> - 2024-02-03 15:40 +0100
    Re: what keyboard do you use? hw <hw@adminart.net> - 2024-02-04 11:30 +0100
      Re: what keyboard do you use? Richmond <dnomhcir@gmx.com> - 2024-02-04 17:30 +0100
      Re: what keyboard do you use? Nate Bargmann <n0nb@n0nb.us> - 2024-02-04 18:40 +0100
        Re: what keyboard do you use? Michael Kjörling <2695bd53d63c@ewoof.net> - 2024-02-04 19:00 +0100
          Re: what keyboard do you use? Nate Bargmann <n0nb@n0nb.us> - 2024-02-04 19:10 +0100
            Re: what keyboard do you use? Michael Kjörling <2695bd53d63c@ewoof.net> - 2024-02-04 19:30 +0100
              Re: what keyboard do you use? hw <hw@adminart.net> - 2024-02-05 12:40 +0100
                Re: what keyboard do you use? "Loris Bennett" <loris.bennett@fu-berlin.de> - 2024-02-05 15:50 +0100
                How can we change the keyboard layout? (was: what keyboard do you  use?) hw <hw@adminart.net> - 2024-02-05 21:10 +0100
                Re: How can we change the keyboard layout? (was: what keyboard do  you use?) Ralph Aichinger <ra@h5.or.at> - 2024-02-05 21:40 +0100
                Re: How can we change the keyboard layout? (was: what keyboard do  you use?) David Wright <deblis@lionunicorn.co.uk> - 2024-02-05 21:40 +0100
                Re: How can we change the keyboard layout? (was: what keyboard do  you use?) hw <hw@adminart.net> - 2024-02-05 23:50 +0100
                Re: How can we change the keyboard layout? (was: what keyboard do  you use?) debian-user@howorth.org.uk - 2024-02-06 12:30 +0100
                Re: How can we change the keyboard layout? (was: what keyboard do  you use?) hw <hw@adminart.net> - 2024-02-06 15:10 +0100
                Re: How can we change the keyboard layout? Michael Kjörling <2695bd53d63c@ewoof.net> - 2024-02-05 22:10 +0100
                Re: How can we change the keyboard layout? hw <hw@adminart.net> - 2024-02-06 00:20 +0100
                Re: How can we change the keyboard layout? David Wright <deblis@lionunicorn.co.uk> - 2024-02-06 05:30 +0100
                Re: How can we change the keyboard layout? Greg Wooledge <greg@wooledge.org> - 2024-02-06 05:50 +0100
                Re: How can we change the keyboard layout? Stefan Monnier <monnier@iro.umontreal.ca> - 2024-02-06 06:30 +0100
                Re: How can we change the keyboard layout? <tomas@tuxteam.de> - 2024-02-06 06:40 +0100
                Re: How can we change the keyboard layout? Stefan Monnier <monnier@iro.umontreal.ca> - 2024-02-06 15:20 +0100
                Re: How can we change the keyboard layout? hw <hw@adminart.net> - 2024-02-06 11:30 +0100
                Re: How can we change the keyboard layout? David Wright <deblis@lionunicorn.co.uk> - 2024-02-07 04:50 +0100
                Re: How can we change the keyboard layout? hw <hw@adminart.net> - 2024-02-07 07:00 +0100
                Re: How can we change the keyboard layout? Greg Wooledge <greg@wooledge.org> - 2024-02-07 13:20 +0100
                Re: How can we change the keyboard layout? John Hasler <john@sugarbit.com> - 2024-02-07 14:40 +0100
                Re: How can we change the keyboard layout? hw <hw@adminart.net> - 2024-02-13 08:20 +0100
                Re: How can we change the keyboard layout? David Wright <deblis@lionunicorn.co.uk> - 2024-02-21 20:00 +0100
                Re: How can we change the keyboard layout? hw <hw@adminart.net> - 2024-02-21 23:20 +0100
                Re: How can we change the keyboard layout? David Wright <deblis@lionunicorn.co.uk> - 2024-02-26 04:30 +0100
                Re: How can we change the keyboard layout? Michael Kjörling <2695bd53d63c@ewoof.net> - 2024-02-06 10:20 +0100
                Re: How can we change the keyboard layout? hw <hw@adminart.net> - 2024-02-06 11:40 +0100
                Re: How can we change the keyboard layout? <tomas@tuxteam.de> - 2024-02-06 11:50 +0100
                Re: How can we change the keyboard layout? Max Nikulin <manikulin@gmail.com> - 2024-02-06 04:20 +0100
                Re: How can we change the keyboard layout? (was: what keyboard do  you use?) Brian Sammon <debian-users-list@brisammon.fastmail.fm> - 2024-02-06 07:40 +0100
                Re: How can we change the keyboard layout? (was: what keyboard do  you use?) debian-user@howorth.org.uk - 2024-02-06 13:10 +0100
                Re: How can we change the keyboard layout? (was: what keyboard do  you use?) hw <hw@adminart.net> - 2024-02-06 14:00 +0100
                solved: How can we change the keyboard layout? (was: what keyboard  do you use?) hw <hw@adminart.net> - 2024-02-06 16:00 +0100
                Re: How can we change the keyboard layout? "Loris Bennett" <loris.bennett@fu-berlin.de> - 2024-02-06 11:20 +0100
                Re: How can we change the keyboard layout? "Thomas Schmitt" <scdbackup@gmx.net> - 2024-02-06 12:00 +0100
                Re: How can we change the keyboard layout? hw <hw@adminart.net> - 2024-02-06 12:50 +0100
                Re: How can we change the keyboard layout? Ralph Aichinger <ra@h5.or.at> - 2024-02-06 13:30 +0100
                Of German keycap translations [was: How can we change the keyboard  layout?] <tomas@tuxteam.de> - 2024-02-06 13:40 +0100
                Re: Of German keycap translations [was: How can we change the  keyboard layout?] hw <hw@adminart.net> - 2024-02-06 14:50 +0100
                Re: How can we change the keyboard layout? hw <hw@adminart.net> - 2024-02-06 14:40 +0100
                [OT] (I guess) Re: How can we change the keyboard layout? Michael Lange <klappnase@t-online.de> - 2024-02-07 00:00 +0100
                Re: what keyboard do you use? Max Nikulin <manikulin@gmail.com> - 2024-02-06 05:20 +0100
                Re: what keyboard do you use? hw <hw@adminart.net> - 2024-02-06 12:10 +0100
                Re: what keyboard do you use? Greg Wooledge <greg@wooledge.org> - 2024-02-06 13:20 +0100
          Re: what keyboard do you use? "James H. H. Lampert" <jamesl@touchtonecorp.com> - 2024-02-05 18:10 +0100
        Re: what keyboard do you use? hw <hw@adminart.net> - 2024-02-05 12:30 +0100
          Re: what keyboard do you use? songbird <songbird@anthive.com> - 2024-02-05 15:10 +0100
            Re: what keyboard do you use? hw <hw@adminart.net> - 2024-02-05 21:50 +0100
              On graphical environments [was: what keyboard do you use?] <tomas@tuxteam.de> - 2024-02-06 06:40 +0100
                Re: On graphical environments [was: what keyboard do you use?] hw <hw@adminart.net> - 2024-02-06 15:00 +0100
                Re: On graphical environments [was: what keyboard do you use?] <tomas@tuxteam.de> - 2024-02-06 15:10 +0100
              Re: what keyboard do you use? songbird <songbird@anthive.com> - 2024-02-06 15:10 +0100
      Re: what keyboard do you use? songbird <songbird@anthive.com> - 2024-02-04 18:40 +0100
        Re: what keyboard do you use? hw <hw@adminart.net> - 2024-02-05 12:10 +0100
          Re: what keyboard do you use? songbird <songbird@anthive.com> - 2024-02-05 15:10 +0100
            Re: what keyboard do you use? hw <hw@adminart.net> - 2024-02-05 20:40 +0100
              Re: what keyboard do you use? songbird <songbird@anthive.com> - 2024-02-06 15:10 +0100
  Re: what keyboard do you use? Joe Pfeiffer <pfeiffer@cs.nmsu.edu> - 2024-02-03 05:00 +0100
  Re: what keyboard do you use? Ralph Aichinger <ra@h5.or.at> - 2024-02-03 05:00 +0100
    Re: what keyboard do you use? Lee <ler762@gmail.com> - 2024-02-03 16:00 +0100
  Re: what keyboard do you use? Stefan Monnier <monnier@iro.umontreal.ca> - 2024-02-03 05:50 +0100
  Re: what keyboard do you use? songbird <songbird@anthive.com> - 2024-02-03 06:20 +0100
    Re: what keyboard do you use? jeremy ardley <jeremy.ardley@gmail.com> - 2024-02-03 07:00 +0100
      Re: what keyboard do you use? songbird <songbird@anthive.com> - 2024-02-03 13:30 +0100
      Re: what keyboard do you use? Dan Ritter <dsr@randomstring.org> - 2024-02-03 13:40 +0100
        Re: what keyboard do you use? Jörg-Volker Peetz <jvpeetz@web.de> - 2024-02-03 15:50 +0100
  Re: what keyboard do you use? David Christensen <dpchrist@holgerdanske.com> - 2024-02-03 06:50 +0100
    Re: what keyboard do you use? "James H. H. Lampert" <jamesl@touchtonecorp.com> - 2024-02-05 17:50 +0100
  Re: what keyboard do you use? Marco Moock <mm@dorfdsl.de> - 2024-02-03 08:40 +0100
    Re: what keyboard do you use? Michael Kjörling <2695bd53d63c@ewoof.net> - 2024-02-03 15:50 +0100
  Re: what keyboard do you use? Eric S Fraga <e.fraga@ucl.ac.uk> - 2024-02-03 14:50 +0100
  Re: what keyboard do you use? Lee <ler762@gmail.com> - 2024-02-03 15:20 +0100
    Re: what keyboard do you use? "Russell L. Harris" <russell@rlharris.org> - 2024-02-03 17:20 +0100
      Re: what keyboard do you use? Roger Price <debian@rogerprice.org> - 2024-02-03 18:40 +0100
  Re: what keyboard do you use? hw <hw@adminart.net> - 2024-02-04 12:20 +0100
  Re: what keyboard do you use? Anssi Saari <anssi.saari@debian-user.mail.kapsi.fi> - 2024-02-04 22:30 +0100
  Re: what keyboard do you use? Henrik Morsing <henrik@morsing.cc> - 2024-02-05 12:40 +0100
    Re: what keyboard do you use? Dan Ritter <dsr@randomstring.org> - 2024-02-05 13:30 +0100
  Re: what keyboard do you use? Peter Ehlert <pb21a@sdi-baja.com> - 2024-02-05 16:20 +0100
    Re: what keyboard do you use? Ash Joubert <ash@transient.nz> - 2024-02-06 00:20 +0100
      Re: what keyboard do you use? Peter Ehlert <pb21a@sdi-baja.com> - 2024-02-06 01:50 +0100
  Re: what keyboard do you use? "James H. H. Lampert" <jamesl@touchtonecorp.com> - 2024-02-05 17:50 +0100
    Re: what keyboard do you use? hw <hw@adminart.net> - 2024-02-05 22:30 +0100
  Re: what keyboard do you use? Steve McIntyre <steve@einval.com> - 2024-02-05 23:30 +0100
  Re: what keyboard do you use? David Wright <deblis@lionunicorn.co.uk> - 2024-02-06 05:30 +0100

csiph-web