octave-maintainers
[Top][All Lists]
Advanced

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

Re: [Patch] do not bind \340 key sequence in readline


From: Michael Goffioul
Subject: Re: [Patch] do not bind \340 key sequence in readline
Date: Tue, 6 Nov 2007 18:08:53 +0100

On 11/6/07, Benjamin Lindner <address@hidden> wrote:
>
>
> Michael Goffioul wrote:
> > Please consider the following patch. This avoids binding \340 key
> > in readline. This key code corresponds indeed to 'à'. I modified the
> > readline code I use for MSVC binary package, so it's no problem.
> > However, this might have an impact on mingw version.
>
> I checked with my local mingw32 build, and yes, this would be an impact
> Unsetting the \340 key binding results in the cursor UP/DOWN keys not
> being functional any more.
> Unsetting the "\e[A" binding however has no effect.
>
> I don't know if this is a mingw32-readline specific problem or a cmd.exe
> specific problem or somewhere else.
> I have used your readline patch for compiling with mingw32, but I'm
> currently still at version 2.9.12. Have tehre been updates to your
> readline patch? (I need to get up-to-date again...)

Yes, I updated it to be more friendly with localized languages.
I previously used the getch() function from Win32, but it had
several limitations. This function returns key sequences
starting with \340 for special keys like arrows or end/home/...
I switched to a ReadConsoleInput-based implementation for
more flexibility; this allowed me to send any key sequence for
arrow keys, so I deciced to use UNIX-like sequences like
"\e[A". This avoids using the code reserved for 'à'.

The current patch is available from octave-forge SVN and should
work as-is under mingw32 (although I didn't try).

Michael.



reply via email to

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