help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: vterm and Meta?


From: hw
Subject: Re: vterm and Meta?
Date: Thu, 03 Aug 2023 15:50:32 +0200
User-agent: Evolution 3.48.4 (3.48.4-1.fc38)

On Wed, 2023-08-02 at 17:05 +0200, Thibaut Verron wrote:
> On 02/08/2023 16:21, hw wrote:
> > On Wed, 2023-08-02 at 07:54 +0000, Thibaut Verron wrote:
> > > > With -Q ... with -q, it says "x is undefined" in the message buffer.
> > > That is... extremely strange.
> > What do you expect to happen?
> 
> It's one thing that Alt-x is translated as x, but I don't get x why x 
> isn't mapped to self-insert-command.
> 
> Not really relevant to your problem, just curious.

Apparently the splash-screen doesn't have x defined.  I tried this
under X11 with Fedoras emacs; the version I compiled doesn't like to
run under X11:


/usr/bin/emacs --version
GNU Emacs 28.2

in the splash screen:
GNU Emacs 28.2 (build 1, x86_64-redhat-linux-gnu, GTK+ Version 3.24.38, cairo 
version 1.17.8)
 of 2023-06-05

with the so-called Alternate Characters Key set to Right Super: 
Left-Alt works as Meta

/usr/bin/emacs -q

in the splash screen:
C-h k Alt-x: M-x runs the command execute-extended-command
C-h k x: x is undefined
C-h k l: l is undefined
C-h k x: q runs the command exit-splash-screen

in the *scratch* buffer:
C-h k x: x runs the command self-insert-command
C-h k q: q runs the command self-insert-command
C-h k l: l runs the command self-insert-command


/usr/bin/emacs -Q
doesn't show the splash screen

in the *scratch* buffer:
C-h k Alt-x: M-x runs the command execute-extended-command
C-h k x: x runs the command self-insert-command
C-h k q: q runs the command self-insert-command
C-h k l: l runs the command self-insert-command


with the so-called Alternate Characters Key set to Left Alt:
Left-Alt doesn't work as Meta

/usr/bin/emacs -q

in the splash screen:

C-h k Alt-x: x is undefined
C-h k x: x is undefined
C-h k l: l is undefined
C-h k x: q runs the command exit-splash-screen

in the *scratch* buffer:
C-h k x: x runs the command self-insert-command
C-h k q: q runs the command self-insert-command
C-h k l: l runs the command self-insert-command


/usr/bin/emacs -Q
doesn't show the splash screen

in the *scratch* buffer:
C-h k Alt-x: x runs the command self-insert-command
C-h k x: x runs the command self-insert-command
C-h k q: q runs the command self-insert-command
C-h k l: l runs the command self-insert-command


That seems pretty consistent.

> > > What about C-h k x ?
> > emacs -Q: x runs the command self-insert-command
> > emacs -q: x is undefined
> > > If you are on X, can you use xev to confirm that it sends the correct 
> > > keycode?
> > I could switch back to see what it sends, but since I want to use
> > wayland, there isn't much point ...
> 
> It is just that xev is a X utility, I didn't expect it to work at all on 
> wayland.

Wayland is pretty cool :)

> It would still be nice to know if it is the same on X (then the problem 
> is with your general configuration) or not (then the problem is with 
> wayland), but already your results give a lot of information.

See above ... The problem is the stupid idea to have a so-called
Alternate Characters Key without an option to turn that off.

I understand the idea that there could be characters that are
unreachable with such a key.  Yet what and which characters those are
would depend on the keyboard layout both in soft- and hardware.

This is very problematic, though: For example, when I use a German
keyboard layout in software, I don't have a right Alt key but AltGr
like I would have with keyboard that has a physical layout like that.
In that case, I would need to pick AltGr as so-called Alternate
Characters Key --- but I can't pick that because the option just isn't
there.

And I don't need it because AltGr is this very key, so again I would
turn it off if I could rather than wasting a precious key for this.
(I don't know what a "Right Super" key is supposed to be, though.
I've never seen a keyboard that has one.)

An why isn't this key called ISO_level_shift3 so it would make sense?
"Alternate Characters Key" doesn't make any sense to anyone.  If we
could just turn it off, I guess everyone would be happy ...

> [...]
> > This seems to be one of these stupid gnome issues.  In gnome, there is
> > Settings-->Keyboard-->Alternate Characters Key, and the key you pick
> > there gets disabled 🙁
> > 
> > How do I turn this off?  I don't need this and it gets in the way.
> 
> Unfortunately I use neither gnome nor wayland. On X, regardless of the 
> DE I'd use setxkbmap to get my keyboard exactly as I want it, is there 
> something like that on wayland?

I couldn't find anything with wayland that would allow one to
configure they keyboard layout.  With gnome and KDE I expect to find
something in the settings that lets us configure every key on the
keyboard we're using to whatever we like, but it's missing.  It was
relatively easy with xkbmap with X11.
 
> Otherwise, perhaps selecting a keyboard layout without 3rd level 
> characters would do the trick -- but you already said you don't know how 
> to change keyboard layouts.

I can only pick from the ones that are predefined, they're in the
settings.  But I can't change the keyboard layout.

It's fine as long as I'm using a keyboard with a physical US layout.
If I were to use a German keyboard it would drive me insane because
there are some keys I need to reconfigure for it to be usable, and I
can't do that with wayland.

> If one alt/meta is enough for you, you could also just set this key to 
> be right alt and then left alt should work fine.

It's a big advantage to me to have both Alt keys working.  When they
came up with the idea of an AltGr key, they should never have omitted
the right Alt key.  (German keyboard layouts are quite
awful. Frequently used keys are difficult to access on
them. Programmers pick keys that are easy to use on their keyboards,
and I'm guessing that 90% or more of them must have US keyboards,
making everthing difficult for everyone else.  I can't blame them,
it's something that doesn't come to mind.  The so-called Alternate
Characters Key is one of these examples, they simply don't get it
because it's entirely outside their experience, and things like that
don't get fixed for many years ...)

Now what wonders me is why the left Alt key never worked before in
emacs.  It hasn't worked for like 30 years and now it finally does.
ESC for meta is not a good replacement.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]