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 23:32:04 +0200
User-agent: Evolution 3.48.4 (3.48.4-1.fc38)

On Thu, 2023-08-03 at 15:46 -0400, tpeplt wrote:
> Yuri Khan <yuri.v.khan@gmail.com> writes:
> > 
> > > How do I turn this off?  I don't need this and it gets in the way.
> > 
> > (a) sacrifice a less important key (maybe right Alt or right Super)
> > (b) wait for a future release of GNOME in which that MR will be merged
> > (c) migrate to Ubuntu which applies that MR as a distro patch
> > (d) migrate off GNOME to a compositor that gives you direct control
> > over xkb options
> > (e) use Gnome Tweaks to disable that option and avoid the Settings →
> > Keyboard panel
> 
> Having read this thread so far, there has been no mention of the
> following.
> 
> As the ASCII table points out, ‘[’ is the control character for ESC
> (escape).  Helpfully, Emacs recognizes this so it can be used as an
> alternative to reaching for the <Esc> key or a poorly-located <Alt> or
> <Meta> key.  It can work on both terminal and graphical Emacs.

That actually works without any ado, at least under wayland.

> If your hands allow this combination (the <Ctrl> key must be held down
> while reaching for and pressing the ‘[’ key), then this can be a good
> combination for Emacs that reduces or eliminates repetitive-stress
> injuries (RSI).
> 
> Here is a keyboard remapping suggestion (bottom row of keyboard):
> 
>    [alt/meta] [ctrl] [      space      ] [ctrl] [alt/meta]
> 
> With this arrangement, the Ctrl-[ combination for the Meta key is
> pressed with your left thumb (short reach) and right pinkie (short
> reach).  A key combination such as C-M-v (the ‘scroll-other-window’
> command) is performed by pressing and holding the <Ctrl> key while
> pressing the ‘[’ key.  Then those keys are released just as would be
> done when pressing the <Esc> key and the <Ctrl>-v key will complete the
> key combination.

Try it on a keyboard shown in [1] (which is an awesome keyboard
indeed), or on a German keyboard :)  It's awkward to press.  Swapping
Ctrl with Alt on the right would make it easier, but that would take
some getting used to.

On a German keyboard, Ctrl-[ is virtually inaccessible because you
would have to press AltGr+Shift+8, and the only AltGr key you get is
on the right.


[1]: 
https://www.pckeyboard.com/mm5/merchant.mvc?Screen=PROD&Product_Code=UB40B5A

> The <Alt> key can then be left to use (only) for those key combinations
> where you need to repeat some key combination, such as <M-v> (the
> ‘scroll-down-command’).  Simply press and hold the <Alt> key while
> repeatedly pressing the ‘v’ as needed.  If you don’t need to repeat a
> Meta key combination, use <Ctrl>-[ instead.

Well, I don't use M-v.  Like I said, Alt for Meta hasn't been working
ever since I came across emacs about 30 years ago.  That was on an
Atari ST. Meta has always been ESC, and using that for movement is no
fun.

> The advantage of this approach is that the long thumb reach for either
> <Alt> key is avoided except for rare instances, while the short thumb
> reach is used for frequent instances of <Ctrl> or <Ctrl>-[.  There is
> also an extra benefit for touch typists -- it is much more rare that
> unused fingers need to be lifted from the home keys.

I always take my fingers off the home row for moving around, except
for Ctrl-a and Ctrl-e.  That way I can use the cursor keys and
PgDown/PgUp keys --- it's what makes sense to me.

Ctrl and Alt are special keys for me which aren't included in
10-finger typing.  Typewriters don't have these keys, and they are
very awkwardly positioned ...  I'd be impressed if you can use these
keys just like all the others.

> If it is available to you, the ‘gnome-tweaks’ package can be used to
> remap the Alt and Ctrl keys.  Within the gnome-tweaks application, see
> the "Keyboard & Mouse" settings and then select the "Additional Layout
> Options".

Right --- yet what makes Alt for Meta so great is that you can do
stuff directly, like M-x right away puts you into the minibuffer where
you can enter the name of the function you want to call.  Having to
use ESC or Ctrl-[ makes this awkward because you have to press ESC
first and then x.  That has always been weird.




reply via email to

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