On 28 Apr 2006, at 11:22, Stephane Goujet wrote:
On Fri, 28 Apr 2006, Richard Frith-Macdonald wrote:
I seem to have a problem with keyboard repeating. I never get a
positive answer from [NSEvent isARepeat].
A quick look at the backend source code reveals (back/Source/x11/
XGServerEvent.m) the line ...
isARepeat: NO /* isARepeat can't be supported with X */
So the X11 backends always set it to 'NO'
Ah, well, then, of course...
I have no idea whether the comment is really accurate ... but I guess
the issue to look at is if/how you can determine whether a keypress
is a repeat in X, and if it can be determined you need to provide a
patch to do it.
I might look for it, but, since I never made any X programming, I
can
assume the person who wrote that knows better than I.
I don't know who wrote it ... but I do know that pretty much none of
the gnustep developers have really been X programmers. Also, even if
the comment was accurate when it was written, that could have been
several years ago and X has changed.
Does someone have a ready workaround ?
Or a ready solution for what I would like to achieve ?
I would like to know, when the mouse button is clicked, if some
keys are
down at the same time. I saw some solutions if the keys are
modifier keys,
but I want to checks the keys 1 to 9.
I guess monitoring *all* key down and key up events may be the way to
do it ...
You could override [NSApplication-
nextEventMatchingMask:untilDate:inMode:dequeue:] and [NSApplication-
discardEventsMatchingMask:beforeEvent:] to keep track of the numeric
keys.
I'm no expert on this though ... you may get better advice.
_______________________________________________
Discuss-gnustep mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/discuss-gnustep