[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How can we change the keyboard layout?



On Tue 13 Feb 2024 at 08:09:40 (+0100), hw wrote:
> On Sun, 2024-02-11 at 10:35 -0600, David Wright wrote:
> > On Wed 07 Feb 2024 at 06:58:39 (+0100), hw wrote:
> > > [...]
> I'd use multiple keyboards if I had to do that and just change between
> keyboards.

Do it if you like. That's what I have on my computer in the basement:
a GB-layout M keyboard and a US-layout Microsoft Pro.

In my case, the layout difference is incidental: the M sits on the
table, the other sits on a shelf, for standing use. (There are two
screens, set to mirroring.)

> > > > My 2014 keyboard appears to identify itself correctly as a K520. My
> > > > old IBM M says it's an "AT Translated Set 2 keyboard", which seems
> > > > reasonable for a keyboard dating from 1988.
> > > 
> > > I can see USB keyboards identifying themselves, but keyboards with
> > > PS/2 or DIN connectors?  How does your keyboard from 1988 connect?
> > 
> > PS/2. IIRC it came with a genuine IBM PS/2 computer.
> 
> Where does it show up?  Where does the information originate from?
> Perhaps the information is merely an assumption some of the involved
> the software makes and not something the keyboard tells it.

I get it from xinput, which I assume gets it from udev, as the ID's
description string occurs in /lib/udev/hwdb.d/60-keyboard.hwdb.

> > > 10% more keys isn't considerably more.  Can you show me a keyboard
> > > with 122 keys that has all keys usable and unique rather than sending
> > > key combinations instead?
> > 
> > That would be difficult:

I think some etiquette might be appropriate. You shouldn't quote half
a sentence just to change the meaning to suit yourself. I wrote:

 "That would be difficult: I've never had a 122 key keyboard, or
  even seen one. You have one. In terms of xev output, are there
  duplicate keys?"

That difficulty has nothing to do with the one you wrote about here:

> That's what I've been saying :)  Years ago I read an article about
> keyboards and it said that due to hardware restrictions, only so many
> keys can be handled so that keyboards with 122 keys don't really work:
> Either the controller in the keyboard key combinations, or the keys do
> nothing.  Apparently such keyboards seem to come from terminals that
> could use all the keys while PC hardware can not.

I've not heard of that. The keyboard files in the kernel source and in
udev seem to have far more keys available than 122.

> > I've never had a 122 key keyboard, or even seen one. You have
> > one. In terms of xev output, are there duplicate keys? Which ones,
> > and how does xev identify them?
> 
> I don't know if there are duplicate keys.  I didn't try out all the
> key to find any, and I haven't noticed any.

It can't take that long to press 122 keys in turn, can it.

> When I press F18, for example, wev says: [ … lengthy output snipped … ]

Does wl signify wayland output? I can't decode it. However, you appear
to have your NumLock on, which could change things considerably.

> For the backtab key it says:

Looking at 911QQZnUFrL.jpg, I don't know which key that is. But again,
NumLock appears to be on.

> These keys don't exist on PCs, so the keyboards converts them.  IIRC,
> Unicomp used to have a version that was suited for terminals like IBM
> made them, i. e. with all 122 keys working and not converted.

That's odd—911QQZnUFrL.jpg shows function keys as high as F24.
Why would it not be able to send a keycode for F18?

> > The keyboards I have access to all send usable keycodes, even where
> > the engravings are the same, eg, Return/36 and KP_Enter/104 are both
> > engraved with "Enter", KP_Subtract/82 and minus/20 are both engraved
> > with "-".
> 
> I get usable keycodes, too.  It looks pretty much like this, only the
> symbols on the two keys in the bottom row on the very left look nicer
> on mine: https://m.media-amazon.com/images/I/911QQZnUFrL.jpg

But without shifts, locks, and key redefinitions, do all your keys
produce unique keycodes? (Whether the last point is possible might
depend on how wayland inserts itself into the process.) Also note that
when keys have been redefined, you can't see what keycodes they would
originally have produced.

> > The only key on this K520 that doesn't send a keycode on its own is
> > the gold FN key, which behaves more like a laptop's Fn key, sending
> > "control functions" like Sleep; plus a battery charge indicator.
> 
> I guess that's useful for laptops --- and one example of how it's
> great to have more keys.  Why is there still no 'Hibernate' key on
> every keyboard?  That's not only useful laptops ...  I could use like
> F20 for it if I could configure that, but unfortunately, my
> workstation doesn't really hibernate, so I haven't tried.

This AiO desktop computer, with a wireless keyboard, obeys FN-F11
(engraved ⏻ with PC underneath) happily, and promptly falls asleep.

> > > > > We're still trying to figure out keyboards manually.  Instead of
> > > > > improvements, we now have come so far that we even can't do that at
> > > > > all now.
> > > > 
> > > > I'm guessing that criticism is specific to wayland.
> > > 
> > > No, it's about keyboards and computers.
> > 
> > Well excuse me. You did say earlier that you were talking about
> > wayland all the time. Now, without indication, you're talking about
> > all keyboards and computers. How are we meant to keep up?
> 
> By reading, applying your intelligence and by understanding?

Because my intelligence and understanding enable me to configure
my keyboards as I want them, I can't understand why you wrote the
first three lines in that block quoted above. It doesn't match
my experience.

> I was particularly interested in changing the keyboard layout for
> wayland because that was an unsolved problem.  That doesn't mean that
> the things I pointed out are specific to wayland.  Perhaps that's not
> obvious when you're always using an US keyboard and never feel a need
> to change the layout.  Like I said before, all the developers must be
> Americans which may explain how keyboard configuration is still such a
> big problem.

So now we're back to wayland. I'm afraid I don't use wayland, and know
next to nothing about it.

But I don't always use a US keyboard: I use two or three GB keyboards too.

> Just see the example above with multiple keyboards connected at the
> same time.  If my desk were larger, it would make sense for me to have
> both a German and an US keyboard connected at the same time, each with
> their own layout.  So how the hell would you do that with Gnome?

No idea: I've never used gnome.

> How do you disable NumLock completely?  I mean that function, not even
> the key.  I want it to be always on unless I change that myself.

I guess you'd just use xmodmap to define the scancode to do nothing.

> For passwords it's outright dumb.  You can't see what you're typing
> and you have no way of knowing what keyboard layout is in use.

Perhaps check your layout by typing characters at the login prompt,
then rub them all out, and continue with your login.

> > I don't use Gnome. I have /e/d/keyboard set up so that I can switch
> > layouts, but I actually set them automatically in .xsession,¹ in
> > the same way as I configure mice buttons and motions, trackpad
> > tapping/scrolling behaviour, and so on. Each device is configured
> > individually.
> 
> Each keyboard, too?

Yes, that way my keyboards will work correctly wherever they're
plugged, as I have a mixture US- and GB-origin laptops and keyboards.

> > When I type Shift-3 on the IBM, it types £; on the Internet Pro it
> > types #, just as indicated on their keycaps. Similarly with ¬ and ~
> > on the key to the left of 1, when shifted. The extra key that GB
> > keyboards have, \|, is left of Z, and the position of one other key
> > is moved, allowing for a tall Return key instead of a wide one.
> 
> Is that because you configured it so, or does it happen without extra
> configuration?

It's in the script that was mentioned in the footnote, where the
Id for the keyboard etc comes from the aforementioned xinput command,
which lists all the devices connected.

> The key left of Z is usually T.  See what I mean?

Not really, no. But now you've revealed your keyboard looks like
911QQZnUFrL.jpg, I can tell you that the extra GB key is the one
that's unengraved, and it's still left of Z, as I wrote.

> On my keyboard the keycap is, strangely, blank, and it types < or >

I remember using a keyboard that had such a key, but I can't recall
which: it was decades ago. But what was most unusual about that
keyboard was the comma and fullstop keys were the same when shifted.
(More conventional would have been ; and :, as in some continental
layouts.) It was great for typing reference lists in scientific papers.

> > You were asking me to refute something that Fedora is alleged to have
> > said, without actually showing anywhere that they said it.
> 
> You can use a search engine as well as I can.  For example:

Why should I search for you?

> https://blog.nicco.love/gnome-is-gradually-dropping-x11/

I'm not really concerned with Gnome—I'm not a DE-user.

> https://pagure.io/fedora-workstation/issue/395

I don't see any timeframe mapped out there, and don't see how it
supports your view.

> > > > > I'm sure others will follow.  It's only that an up to it's date Debian
> > > > > is already outdated so badly that you can't even get an AMD graphics
> > > > > card to work which was released a year ago.  Maybe that's why Debian
> > > > > users haven't noticed yet.

> I don't see why or how facts would insult anyone.

"So badly" is not a fact, and neither is "Debian users haven't noticed yet"

> Experience is not opinion.

/Your/ experience is what forms your opinions, which you now call "facts".
Others may have had different experiences and hold different opinions.
I certainly do.

> I'm not insulting anyone.  If I did insult someone, I'd have reason
> to, and that someone would probably know.
> 
> Of course you may feel insulted by facts and/or experience, but don't
> blame me for it.
> 
> Besides, there is no such thing as 'social media'; what you're
> referring to is commercial media, and I don't have anything to do with
> that.

I think the first two paragraphs support my view. As for the third:

  https://en.wikipedia.org/wiki/Social_media

Cheers,
David.


Reply to: