Results 1 to 2 of 2

Thread: Multiple "keydown" signals on a single keystroke

  1. #1
    Serf
    Join Date
    Mar 2008
    Location
    Ukraine, Kiev
    Posts
    2

    Default Multiple "keydown" signals on a single keystroke

    I connected handler function to "keydown" signal using CL_Keyboadd::::sig_key_down().connect().

    When a key on keyboard is pressed for a long time, that function is called multiple times, according to OS's keyboard settings (repeat rate and delay).

    Is there any convenient way to change this behavior, i. e. to emit the signal only one time per keystroke?

    I am using ClanLib 0.8.1.

  2. #2
    Administrator Seth's Avatar
    Join Date
    Jul 2002
    Location
    Japan
    Posts
    5,343

    Default

    A way to do this would be to check the repeat_count member of the CL_InputEvent that is passed in to your key stroke signal callback.

    If more than 1, ignore the keypress.
    Seth A. Robinson
    Robinson Technologies

Similar Threads

  1. Coppying "skeleton" wont work (MAC)
    By Suudsu2200 in forum Novashell Game Creation System
    Replies: 1
    Last Post: 03-04-2007, 08:24 PM
  2. undo on "replace selected" only does one at a time
    By whisperstorm in forum Novashell Game Creation System
    Replies: 1
    Last Post: 11-25-2006, 05:41 AM
  3. Legend of Tenjin.... Press "S" for screen #?
    By tazrulz69 in forum Dink Smallwood HD
    Replies: 0
    Last Post: 02-28-2004, 07:44 AM
  4. Funeral Quest Server "Initializing"
    By in forum Funeral Quest
    Replies: 2
    Last Post: 01-18-2004, 02:17 AM
  5. Di-Mart Guns -Explanation of the "Store Guy" event
    By rmcnew in forum Funeral Quest
    Replies: 2
    Last Post: 01-15-2004, 06:25 AM

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •