[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Nano-devel] Ctrl+Left and Ctrl+Right revisited
From: |
Benno Schulenberg |
Subject: |
[Nano-devel] Ctrl+Left and Ctrl+Right revisited |
Date: |
Wed, 02 Jan 2008 00:20:04 +0100 |
User-agent: |
KMail/1.9.7 |
Hi,
A year ago I tried to get Ctrl+Left to go to the preceding word and
Ctrl+Right to the next, but didn't succeed. Even with David's help
it didn't work.
This time around I put some print statements into the code, and saw
that Ctrl+Left and Right never even reach get_escape_seq_kbinput().
With an 'fprintf(stderr, "BAD KEY: 0x%x ", input);' stuck in after
the "Unknown command" message in nano.c, those two key combinations
print 'BAD KEY: 0x203' and 'BAD KEY: 0x205' when running on an
xterm or a Konsole. When simply running 'cat' those combinations
produce the normal '^[[1;5D' and '^[[1;5C' sequences, but when
'nano' is running they apparently produce different codes.
So with attached patch applied, finally Ctrl+Left and Ctrl+Right do
what I want them to do (except that Ctrl+Left doesn't work on the
status line.) This is of course not a proper addition: it simply
replaces the existing two key combinations instead of adding two
alternative ones, but this latter change is beyond me.
Regards,
Benno
nano--control-cursor-Konsole.patch
Description: Text Data
- [Nano-devel] Ctrl+Left and Ctrl+Right revisited,
Benno Schulenberg <=