This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA] Merge fix for mingw support for Home,End,Insert and Delete keys inot gdb readline


> 2013-09-24  Pierre Muller  <muller@sourceware.org>
> 
> 	Merge patch accepted in bash development branch.
> 	* src/readline/readline.c (bind_arrow_keys_internal):
> 	Handle VK_HOME, VK_END, VK_DELETE and VK_INSERT for mingw
> 	hosts.

I think it's OK for Pierre to check this pach in, now that it is
in the official repo as well.

Please go ahead and commit.  There is ChangeLog.gdb, so can you adjust
your entry to read:

        * readline.c ([...]

?

If there are any comments about how to label your entry, we can
fix that later on.

> 
> Index: src/readline/readline.c
> ===================================================================
> RCS file: /cvs/src/src/readline/readline.c,v
> retrieving revision 1.11
> diff -u -p -r1.11 readline.c
> --- src/readline/readline.c	11 May 2011 23:38:39 -0000	1.11
> +++ src/readline/readline.c	24 Sep 2013 06:11:46 -0000
> @@ -1159,6 +1159,10 @@ bind_arrow_keys_internal (map)
>    rl_bind_keyseq_if_unbound ("\340P", rl_get_next_history);
>    rl_bind_keyseq_if_unbound ("\340M", rl_forward_char);
>    rl_bind_keyseq_if_unbound ("\340K", rl_backward_char);
> +  rl_bind_keyseq_if_unbound ("\340G", rl_beg_of_line);
> +  rl_bind_keyseq_if_unbound ("\340O", rl_end_of_line);
> +  rl_bind_keyseq_if_unbound ("\340S", rl_delete);
> +  rl_bind_keyseq_if_unbound ("\340R", rl_overwrite_mode);
>  #endif
>  
>    _rl_keymap = xkeymap;
> 
> > -----Message d'origine-----
> > De : gdb-patches-owner@sourceware.org [mailto:gdb-patches-
> > owner@sourceware.org] De la part de Pierre Muller
> > Envoyé : vendredi 14 décembre 2012 09:37
> > À : bug-readline@gnu.org
> > Cc : gdb-patches@sourceware.org; 'Eli Zaretskii'; 'Tom Tromey'
> > Objet : Fix mingw support for Home,End,Insert and Delete keys
> > 
> >   The following patch fixes some non-working keys
> > for mingw32, when used without ncurses.
> > 
> >   It doesn't fix the problem of the numeric keypad uses
> > with NumKey Off...
> > Because those generate a prefix with code 0x0,
> > but as readline uses zero terminated string for key sequences...
> > I don't know how I could handle those correctly!
> > 
> > 
> > 
> > 
> > Pierre Muller
> > GDB pascal language support maintainer
> > 
> > 2012-12-10  Pierre Muller  <muller@sourceware.org>
> > 
> >         * readline.c (bind_arrow_keys_internal): Add missing handling of
> >         VK_HOME, VK_END, VK_DELETE and VK_INSERT for mingw hosts.
> > 
> > 
> > $ git diff -u -p readline.c
> > diff --git a/readline.c b/readline.c
> > index f2e4d93..abb09d1 100644
> > --- a/readline.c
> > +++ b/readline.c
> > @@ -1155,10 +1155,24 @@ bind_arrow_keys_internal (map)
> >    rl_bind_keyseq_if_unbound ("\033OF", rl_end_of_line);
> > 
> >  #if defined (__MINGW32__)
> > +  /* Handle Windows OS special keys sent as 0xe0 followed
> > +     by keycode.  */
> > +  /* Handles VK_UP keycode.  */
> >    rl_bind_keyseq_if_unbound ("\340H", rl_get_previous_history);
> > +  /* Handles VK_DOWN keycode.  */
> >    rl_bind_keyseq_if_unbound ("\340P", rl_get_next_history);
> > +  /* Handles VK_RIGHT keycode.  */
> >    rl_bind_keyseq_if_unbound ("\340M", rl_forward_char);
> > +  /* Handles VK_LEFT keycode.  */
> >    rl_bind_keyseq_if_unbound ("\340K", rl_backward_char);
> > +  /* Handles VK_HOME keycode.  */
> > +  rl_bind_keyseq_if_unbound ("\340G", rl_beg_of_line);
> > +  /* Handles VK_END keycode.  */
> > +  rl_bind_keyseq_if_unbound ("\340O", rl_end_of_line);
> > +  /* Handles VK_DELETE keycode.  */
> > +  rl_bind_keyseq_if_unbound ("\340S", rl_delete);
> > +  /* Handles VK_INSERT keycode.  */
> > +  rl_bind_keyseq_if_unbound ("\340R", rl_overwrite_mode);
> >  #endif
> > 
> >    _rl_keymap = xkeymap;

-- 
Joel


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]