qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] Fix curses return key when using -k
@ 2010-02-28 14:35 Samuel Thibault
  2010-02-28 17:06 ` [Qemu-devel] " Samuel Thibault
  2010-03-02 23:16 ` [Qemu-devel] " andrzej zaborowski
  0 siblings, 2 replies; 3+ messages in thread
From: Samuel Thibault @ 2010-02-28 14:35 UTC (permalink / raw)
  To: qemu-devel

Hello,

There is a small incoherency in curses_keys.h, which makes it fail to
emit \n when using e.g. -k fr: curses2keysym transforms \r and 0x157
into \n, but name2keysym binds \r with Return, not \n.  The patch below
fixes that.

Samuel

diff --git a/curses_keys.h b/curses_keys.h
index a6e41cf..6030720 100644
--- a/curses_keys.h
+++ b/curses_keys.h
@@ -446,7 +446,7 @@ static const name2keysym_t name2keysym[] = {
     /* Special keys */
     { "BackSpace", 0x07f },
     { "Tab", '\t' },
-    { "Return", '\r' },
+    { "Return", '\n' },
     { "Right", 0x105 },
     { "Left", 0x104 },
     { "Up", 0x103 },

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [Qemu-devel] Re: [PATCH] Fix curses return key when using -k
  2010-02-28 14:35 [Qemu-devel] [PATCH] Fix curses return key when using -k Samuel Thibault
@ 2010-02-28 17:06 ` Samuel Thibault
  2010-03-02 23:16 ` [Qemu-devel] " andrzej zaborowski
  1 sibling, 0 replies; 3+ messages in thread
From: Samuel Thibault @ 2010-02-28 17:06 UTC (permalink / raw)
  To: qemu-devel

Samuel Thibault, le Sun 28 Feb 2010 15:35:19 +0100, a écrit :
> There is a small incoherency in curses_keys.h, which makes it fail to
> emit \n when using e.g. -k fr: curses2keysym transforms \r and 0x157
> into \n, but name2keysym binds \r with Return, not \n.  The patch below
> fixes that.

Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>

> Samuel
> 
> diff --git a/curses_keys.h b/curses_keys.h
> index a6e41cf..6030720 100644
> --- a/curses_keys.h
> +++ b/curses_keys.h
> @@ -446,7 +446,7 @@ static const name2keysym_t name2keysym[] = {
>      /* Special keys */
>      { "BackSpace", 0x07f },
>      { "Tab", '\t' },
> -    { "Return", '\r' },
> +    { "Return", '\n' },
>      { "Right", 0x105 },
>      { "Left", 0x104 },
>      { "Up", 0x103 },

-- 
Samuel
 jr> J'ai fait.
 Ne bougez pas, l'aide soignante va venir nettoyer.
 -+- FF in GNU - Le vieil homme et la merde -+-

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] [PATCH] Fix curses return key when using -k
  2010-02-28 14:35 [Qemu-devel] [PATCH] Fix curses return key when using -k Samuel Thibault
  2010-02-28 17:06 ` [Qemu-devel] " Samuel Thibault
@ 2010-03-02 23:16 ` andrzej zaborowski
  1 sibling, 0 replies; 3+ messages in thread
From: andrzej zaborowski @ 2010-03-02 23:16 UTC (permalink / raw)
  To: Samuel Thibault; +Cc: qemu-devel

On 28 February 2010 15:35, Samuel Thibault <samuel.thibault@gnu.org> wrote:
> Hello,
>
> There is a small incoherency in curses_keys.h, which makes it fail to
> emit \n when using e.g. -k fr: curses2keysym transforms \r and 0x157
> into \n, but name2keysym binds \r with Return, not \n.  The patch below
> fixes that.

Thanks, applied both patches.

Cheers

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-03-02 23:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-28 14:35 [Qemu-devel] [PATCH] Fix curses return key when using -k Samuel Thibault
2010-02-28 17:06 ` [Qemu-devel] " Samuel Thibault
2010-03-02 23:16 ` [Qemu-devel] " andrzej zaborowski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).