xbindkeys-devel
[Top][All Lists]
Advanced

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

Re: [Xbindkeys-devel] release modifier behaviour


From: Philippe Brochard
Subject: Re: [Xbindkeys-devel] release modifier behaviour
Date: Sat, 12 May 2012 21:59:12 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux)

Hi,

Commited in your name.

Thanks.

Regards,

Philippe

Dmitry Klimov writes:

> Hello.
>
> With autorepeat enabled "Release" modifier doesn't work as expected. While 
> key pressed, autorepeat generates Press/Release events again and again:
>
> ------------------------
> Key release !
> e.xkey.keycode=38
> e.xkey.state=5
> "urxvt"
>     Release + Control+Shift + a
> got screen 0 for window ab
> Start program with fork+exec call
> Key press !
> e.xkey.keycode=38
> e.xkey.state=5
> Key release !
> e.xkey.keycode=38
> e.xkey.state=5
> "urxvt"
>     Release + Control+Shift + a
>
> ...
>
>  etc
> ------------------------
>
> To ignore autogenerated KeyRelease events we could use 
> XkbSetDetectableAutoRepeat (see attachment). 
>
> Thanks.
>
>
>
>
>
> ===File ~/build/xbindkeys.old/autorepeat-fix.diff===========
> --- options.h~        2009-01-24 16:13:14.000000000 +0300
> +++ options.h 2012-05-11 00:44:24.000000000 +0400
> @@ -36,6 +36,7 @@
>  extern int have_to_show_binding;
>  extern int have_to_get_binding;
>  extern int have_to_start_as_daemon;
> +extern int detectable_ar;
>  
>  extern char *geom;
>  
> --- options.c~        2011-03-09 18:19:44.000000000 +0300
> +++ options.c 2012-05-11 00:46:40.000000000 +0400
> @@ -42,6 +42,7 @@
>  int have_to_show_binding = 0;
>  int have_to_get_binding = 0;
>  int have_to_start_as_daemon = 1;
> +int detectable_ar = 0;
>  
>  char *geom = NULL;
>  
> @@ -158,6 +159,11 @@
>       {
>         have_to_start_as_daemon = 0;
>       }
> +      else if (strcmp (argv[i], "-sd") == 0 
> +            || strcmp (argv[i], "--detectable-ar") == 0)
> +     {
> +       detectable_ar = 1;
> +     }
>        else
>       {
>         show_help ();
> --- xbindkeys.c~      2010-12-05 20:08:48.000000000 +0300
> +++ xbindkeys.c       2012-05-11 00:43:32.000000000 +0400
> @@ -36,6 +36,7 @@
>  #include <libguile.h>
>  #endif
>  
> +#include <X11/XKBlib.h>
>  
>  
>  void end_it_all (Display * d);
> @@ -91,6 +92,17 @@
>    d = start (display_name);
>    current_display = d;
>  
> +  if (detectable_ar)
> +    {
> +      Bool supported_rtrn;
> +      XkbSetDetectableAutoRepeat(d, True, &supported_rtrn);
> +
> +      if (!supported_rtrn) 
> +     {
> +       fprintf (stderr, "Could not set detectable autorepeat\n");
> +     }
> +    }
> +
>    get_offending_modifiers (d);
>  
>    if (have_to_get_binding)
> ============================================================
>
> --
> wbr, Dmitry



reply via email to

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