[PD] keyname win / linux
Frank Barknecht
barknech at ph-cip.uni-koeln.de
Thu Aug 15 08:47:40 CEST 2002
Hi,
marius schebella hat gesagt: // marius schebella wrote:
> new problems: another difference between win(dos) and lin(ux) is the behavior
> of the keyboard. if i hit a key and hold it down, then windows gives up, up,
> up.... down. but linux reports up, down, up down, up, down .... (don't
> laugh!). in this case i like the windows way more.
It's the Xserver's autorepeat option, that's responsible for this on
Linux/X. You can turn it off with
$ xset r off
and on again with
$ xset r on
> has anybody already an idea how to deal with that? perfect would be
> a "1" if the key is hit (no matter how long i hold it down) and a
> "0" if it is released.
If you have autorepeat on, there's nothing you can do, because even if
you hold a key, the Xserver itself presses and releases it
continuously. And having "xset r off" is really annoying, if you want
to type something, and the Backspace key refuses to start running...
But you can disable autorepeat only for a specific set of keys, for
example only for the keys F1-F12.
$ xset -h
[...]
To turn auto-repeat off or on:
-r [keycode] r off
r [keycode] r on
r rate [delay [rate]]
The keycode is found with xev, and to un-repeat F1, I would issue:
$ xset -r 67
Or you could raise the delay, after which the autorepeat starts.
I don't know, how W32-systems handle this, but it probably is one of
the things, that are rather different between OSes and there's
not much, PD can do about it. Font handling is a similar area...
ciao
--
Frank Barknecht _ ______footils.org__
More information about the Pd-list
mailing list