discuss-gnustep
[Top][All Lists]
Advanced

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

[NSEvent isARepeat]


From: Stephane Goujet
Subject: [NSEvent isARepeat]
Date: Fri, 28 Apr 2006 12:23:40 +0300 (EEST)

Hello,

  I seem to have a problem with keyboard repeating. I never get a positive
answer from [NSEvent isARepeat].

-(void) keyDown:(NSEvent *) event {
  NSLog(@"keyDown\n");
  if([event isARepeat]) {
    NSLog(@"Repeat\n");
  }
}

-(void) keyUp:(NSEvent *) event {
  (void) event;
  NSLog(@"keyUp\n");
}

  With Cocoa, if I press a key and keep it down a while, I get the
expected result:

keyDown
keyDown
Repeat
keyDown
Repeat
keyDown
Repeat
...
keyDown
Repeat
keyUp

  With GNUstep (on a different computer, running Linux), I never get a
repeat detected:

keyDown
keyUp
keyDown
keyUp
keyDown
keyUp
...
keyDown
keyUp
keyDown
keyUp

  Where can this problem come from ?
-- keyboard ?
-- XWindow server (XFree) ?
-- window manager (Window Maker) ?
-- GNUstep ?

  I must say I tried with two differents keyboards and the results were
the same.
  Also, I tried to change things at X level with "xset -r" to turn off
keyboard repeating. Well, it turned it off : then I just got 1 keyDown
when I pressed down the key and 1 keyUp when releasing it.

  Thanks for helping!

Goodbye,
         Stéphane.

PS: I think I am using a snapshot dated 20060228. BTW, is there a way to
find which version of GNUstep components is installed ?





reply via email to

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