On Mon, 29 Aug 2011 06:52:44 -0400
Craig <craigbakal...@verizon.net> wrote:

> Hi All,
> 
> Don't we have a way to program (via gtk) if a key, when pressed,
> repeats its signal?  Example- the 'a' key, if repeat is on key, I get
> aaaaaaaaaaa, or if repeat is off I get one a.  Right now I am using
> the System Settings.

Connect to the key-press-event signal, remember the last key and ignore
follow-up press events for that particular key? (This requires to reset
the remembered key whenever a different key is pressed.)

If you want this behavior globally and not just in your application or
widget, you can do something like

  XKeyboardControl control;
  control.auto_repeat_mode = 0;

  gdk_error_trap_push ();
  XChangeKeyboardControl (GDK_DISPLAY (), KBAutoRepeatMode, &control);
  gdk_error_trap_pop ();

That will suppress repeated key press events entirely.

HTH,
Jannis
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Reply via email to