nano-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] input: allow distinguishing shifted from unshifted Meta keys


From: Benno Schulenberg
Subject: Re: [PATCH] input: allow distinguishing shifted from unshifted Meta keystrokes
Date: Wed, 11 Dec 2019 16:24:25 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.2

Op 11-12-2019 om 01:36 schreef Brand Huntsman:
> I don't agree with adding an option that requires changing all existing meta
> binds to lowercase before adding shifted binds.

The patch was incomplete.  I posted it just to see if anyone was interested
in having more bindable keystrokes.

In a subsequent patch, all default Meta binds will be lowercased when the
user sets 'splitmeta'.  Any Meta binds that the user herself has made in
her nanorc, she will have to lowercase first before starting to use 'set
splitmeta'.  I don't think that is too much to ask.

> The patch I've been using for
> a while adds an S modifier to bind shifted keys, M-S-A is shifted M-A.

Hmm.  I don't like that much, five characters to describe one keystroke.

> Both patches have a couple issues which is why I never released my patch.
> Capslock works fine in a linux VT but all binds are flipped in urxvt and
> xterm.

That can't be helped, that is how CapsLock works.  What we could do is ask
upstream (Xorg?) to ignore CapsLock when Alt is held.  (Firefox and Thunderbird
already ignore both CapsLock and Shift when Alt is held.  Xfce ignores CapsLock
but does not ignore Shift -- for example, in Xfce Terminal, Alt+h will open the
Help menu, but Shift+Alt+h will just beep.  Weird.)

(For me personally, CapsLock is not a problem: I don't need it and have
repurposed the key for Compose.)

> The other problem is that
> functions in implants can "see" the shift key in a linux VT. This is already a
> problem with shifted meta punctuation such as M-$.
> 
> bind M-$ "XXX{verbatim END key}" main
> 
> The XXX is not highlighted, but everything to end of line is.

This was hard to parse.  I thought you were talking about how things looked
in the nanorc file.  But you refer to typing M-$ (Alt+Shift+$) on a VT.

> This doesn't
> happen when binding the "end" function to M-$.

For me, it also happens when binding 'end'.  For example:

  bind M-$ "^[[F" main
  bind M-% end main

(where ^[ is a literal escape character).  Then typing either Shift+Alt+$
or Shift+Alt+% in the middle of a line on a console will highlight/select
the rest of the line.  Maybe you already have a patch applied to prevent
the second case?

Benno

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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