nano-devel
[Top][All Lists]
Advanced

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

[Nano-devel] rebinding Home and End...


From: Benno Schulenberg
Subject: [Nano-devel] rebinding Home and End...
Date: Sat, 28 Jun 2014 20:42:41 +0200

Hi Mark,

On Sat, Jun 28, 2014, at 18:25, Mark Majeres wrote:
> I recently discovered the function 'verbatim input', shortcut M-V
> 
> This function is very useful for adding keybindings to the resource
> file.

??  How do you use M-V to rebind keys?

> Maybe that's it's main purpose?

No, I would think that it's main purpose is to allow the user to
put actual control codes into the file.  Typing <M-V> <^C> seems
to put simply ^ and C into the file, but if you look at the actual
bytes with xxd, it is not 0x5e 0x43, but 0x03, the code for Ctrl-C.
And apart from control codes, to put characters into the file which
the user cannot type on the keyboard, the you look up the code
and type: <M-V>00cccc or <M-V>01cccc.

> However, I don't recall seeing
> a tip in the nano user manual to use the function.

Indeed, the whole verbatim function is still missing from the docs,
even from the info document.  Work to do.

> I was trying to
> reassign Home and End, but couldn't figure it out.  I don't think the
> output from 'verbatim input' correctly matches the required binding.
> If any knows how to bind Home and End, please share how.

In nano it is not possible to rebind the actual <Home> and <End>
keys.  The ability was removed in revision 4797, because allowing
it amde other key combos stop working.  Nano's input routines are
not nicely divided in two layers, where first all kinds of keycodes and
escape sequences get translated to a simple enumeration of virtual
keycodes, and then these virtual keycodes can be bound to any function.
No, some codes get tied to function deep in the input routines.  This
can be fixed, but not quickly.

Benno

-- 
http://www.fastmail.fm - A fast, anti-spam email service.




reply via email to

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