I am working with the core keyboard objects and I noticed that when the key auto-repeats, these objects ([key], [keyup], and [keyname]), send a stream of alternating 0's and 1's. I think that the correct way to do auto-repeat would just be to send out 1's for each repeat event, rather than alternating 0's and 1's. The current condition makes it very hard to use the keys in their held state.
I would like to file a bug report, but I am wondering if there is any reason to keep the current behavior. Attached is a patch that illustrates my point.
.hc
________________________________________________________________________ ____
¡El pueblo unido jamás será vencido!
On Wed, 24 Nov 2004, Hans-Christoph Steiner wrote:
I am working with the core keyboard objects and I noticed that when the key auto-repeats, these objects ([key], [keyup], and [keyname]), send a stream of alternating 0's and 1's. I think that the correct way to do auto-repeat would just be to send out 1's for each repeat event, rather than alternating 0's and 1's. The current condition makes it very hard to use the keys in their held state.
I would like to file a bug report, but I am wondering if there is any reason to keep the current behavior. Attached is a patch that illustrates my point.
AFAIK, the X11 specification does it like that; at the very least, all versions of XFree86 of the last 7 years (or so) do it like that, as well as SUN's Slowlaris/Dope'n'win. I've never seen the explanation.
_____________________________________________________________________ Mathieu Bouchard -=- Montréal QC Canada -=- http://artengine.ca/matju
Hallo, Mathieu Bouchard hat gesagt: // Mathieu Bouchard wrote:
AFAIK, the X11 specification does it like that; at the very least, all versions of XFree86 of the last 7 years (or so) do it like that, as well as SUN's Slowlaris/Dope'n'win. I've never seen the explanation.
Attached is a simple abstraction for switching between autorepeat on and off for X using [shell].
Ciao
On Nov 25, 2004, at 6:45 AM, Mathieu Bouchard wrote:
On Wed, 24 Nov 2004, Hans-Christoph Steiner wrote:
I am working with the core keyboard objects and I noticed that when the key auto-repeats, these objects ([key], [keyup], and [keyname]), send a stream of alternating 0's and 1's. I think that the correct way to do auto-repeat would just be to send out 1's for each repeat event, rather than alternating 0's and 1's. The current condition makes it very hard to use the keys in their held state.
I would like to file a bug report, but I am wondering if there is any reason to keep the current behavior. Attached is a patch that illustrates my point.
AFAIK, the X11 specification does it like that; at the very least, all versions of XFree86 of the last 7 years (or so) do it like that, as well as SUN's Slowlaris/Dope'n'win. I've never seen the explanation.
How then can you detect a key being held down in X? I mean it would be possible by tracking the auto-repeated values, but that seems needlessly complicated. MacOS X HID Manager and Linux input events use auto-repeat events to represent this, which makes things much more flexible. It would be nice to have these objects follow this model more. Maybe auto-repeat mode control be controlled by an argument.
.hc
________________________________________________________________________ ____
Man has survived hitherto because he was too ignorant to know how to realize his wishes. Now that he can realize them, he must either change them, or perish. -William Carlos Williams
On Sat, 27 Nov 2004, Hans-Christoph Steiner wrote:
How then can you detect a key being held down in X? I mean it would be possible by tracking the auto-repeated values, but that seems needlessly complicated.
There is a way to turn off autorepeat for all keys (xset r off) or on a key-by-key basis (eg: xset -r 42)
But that is a global setting for the xserver, it's not on a window-per-window basis.
The only way to make it local is to register for Enter/Leave events and change the key settings every time and keep a backup of the default settings.
This is AFAIK. I've read the X11 spec a few years ago; I may have forgotten some segments of it.
_____________________________________________________________________ Mathieu Bouchard -=- Montréal QC Canada -=- http://artengine.ca/matju
On Sat, 27 Nov 2004, Mathieu Bouchard wrote:
On Sat, 27 Nov 2004, Hans-Christoph Steiner wrote:
How then can you detect a key being held down in X? I mean it would be possible by tracking the auto-repeated values, but that seems needlessly complicated.
There is a way to turn off autorepeat for all keys (xset r off) or on a key-by-key basis (eg: xset -r 42)
But that is a global setting for the xserver, it's not on a window-per-window basis.
The only way to make it local is to register for Enter/Leave events and change the key settings every time and keep a backup of the default settings.
This is AFAIK. I've read the X11 spec a few years ago; I may have forgotten some segments of it.
woops, i had deleted the first paragraph i wrote, and forgot to rewrite it. It read pretty much like this:
If you don't want to disable autorepeat, then you would have to track the auto-repeated values, which requires matching a KeyRelease with a subsequent KeyPress of the same timestamp, so a real KeyRelease can only be confirmed after you have received a message with a later timestamp (!!!) or use some kind of timeout that may or may not work (e.g. if remote X11 is in use and there's a bit of lag on the network). So yes it's complicated to do it right.
_____________________________________________________________________ Mathieu Bouchard -=- Montréal QC Canada -=- http://artengine.ca/matju
There's no reason to keep it as is, but I don't know how to fix it!
cheers Miller
On Wed, Nov 24, 2004 at 09:21:54PM -0500, Hans-Christoph Steiner wrote:
I am working with the core keyboard objects and I noticed that when the key auto-repeats, these objects ([key], [keyup], and [keyname]), send a stream of alternating 0's and 1's. I think that the correct way to do auto-repeat would just be to send out 1's for each repeat event, rather than alternating 0's and 1's. The current condition makes it very hard to use the keys in their held state.
I would like to file a bug report, but I am wondering if there is any reason to keep the current behavior. Attached is a patch that illustrates my point.
.hc
¡El pueblo unido jamás será vencido!
I'll look into this once I get some time since I am immersed in the world of HID implementations these days.
.hc
On Nov 27, 2004, at 8:19 PM, Miller Puckette wrote:
There's no reason to keep it as is, but I don't know how to fix it!
cheers Miller
On Wed, Nov 24, 2004 at 09:21:54PM -0500, Hans-Christoph Steiner wrote:
I am working with the core keyboard objects and I noticed that when the key auto-repeats, these objects ([key], [keyup], and [keyname]), send a stream of alternating 0's and 1's. I think that the correct way to do auto-repeat would just be to send out 1's for each repeat event, rather than alternating 0's and 1's. The current condition makes it very hard to use the keys in their held state.
I would like to file a bug report, but I am wondering if there is any reason to keep the current behavior. Attached is a patch that illustrates my point.
.hc
¡El pueblo unido jamás será vencido!
Hi all,
I've committed the "array" changes to cvs (main branch). Next I hope to get back to debugging the 0.38 release (still in "test 10" right now.)
Next changes I want to make to the "head" (which can be considered a test version for 0.39 now) is to update the portaudio and portmidi code, and if latency is still a problem for ASIO, possibly to put in Tim Blechman's native ASIO support.
cheers Miller
I've committed the "array" changes to cvs (main branch). Next I hope to get back to debugging the 0.38 release (still in "test 10" right now.)
i hope it's not that difficult to include it in the devel branch with the thread locks ...
Next changes I want to make to the "head" (which can be considered a test version for 0.39 now) is to update the portaudio and portmidi code, and if latency is still a problem for ASIO, possibly to put in Tim Blechman's native ASIO support.
i think it's important to be able to switch between two different dsp schedulers, one "traditional" and one callback based... i haven't been able to run the callback-based scheduler correctly (unfortunately i only have a low-end usb audio device on my windoze machine), but at least it's a base, we could work on... beside that, there is still a bug in the native asio code, that i haven't found yet ...
cheers ... tim
On Nov 28, 2004, at 4:27 PM, Miller Puckette wrote:
I've committed the "array" changes to cvs (main branch). Next I hope to get back to debugging the 0.38 release (still in "test 10" right now.)
...is this still built with ./configure, or are ya'll using tim's ./bootstrap method? Either way, something along these lines is missing in MAIN/HEAD...
jamie
It's just plain ./configure for now... I haven't looked at the ./bootstrap thing yet.
cheers Miller
On Mon, Nov 29, 2004 at 12:28:31PM -0500, james tittle wrote:
On Nov 28, 2004, at 4:27 PM, Miller Puckette wrote:
I've committed the "array" changes to cvs (main branch). Next I hope to get back to debugging the 0.38 release (still in "test 10" right now.)
...is this still built with ./configure, or are ya'll using tim's ./bootstrap method? Either way, something along these lines is missing in MAIN/HEAD...
jamie
...is this still built with ./configure, or are ya'll using tim's ./bootstrap method? Either way, something along these lines is missing in MAIN/HEAD...
well, the autobuild system is working for linux only ... and since i'm not a cygwin / osx expert i'm still hoping that someone ports adds support for these platforms ...
cheers ... tim
On Nov 29, 2004, at 4:59 PM, Tim Blechmann wrote:
...is this still built with ./configure, or are ya'll using tim's ./bootstrap method? Either way, something along these lines is missing in MAIN/HEAD...
well, the autobuild system is working for linux only ... and since i'm not a cygwin / osx expert i'm still hoping that someone ports adds support for these platforms ...
...hmm: maybe I didn't ask the right question?
...at the risk of exposing too much of my expansive ignorance, is it ok to copy the "configure" file from previous source trees, because it isn't in the MAIN/HEAD branch (and perhaps it should be)?
tanx, jamie
...at the risk of exposing too much of my expansive ignorance, is it ok to copy the "configure" file from previous source trees, because it
can't you just rebuild it with autoconf? the configure script is something that shouldn't be distributed on the cvs ...
cheers ... tim
On Nov 29, 2004, at 4:59 PM, Tim Blechmann wrote:
...is this still built with ./configure, or are ya'll using tim's ./bootstrap method? Either way, something along these lines is missing in MAIN/HEAD...
well, the autobuild system is working for linux only ... and since i'm not a cygwin / osx expert i'm still hoping that someone ports adds support for these platforms ...
Unless someone else gets to it first, I'll make this work on MacOS X in January.
.hc
________________________________________________________________________ ____
"[W]e have invented the technology to eliminate scarcity, but we are deliberately throwing it away to benefit those who profit from scarcity." -John Gilmore