mirror of
https://github.com/dschmenk/apple2pi.git
synced 2024-11-28 09:49:27 +00:00
Set sane auto-repeat
This commit is contained in:
parent
b3d93f076c
commit
e85314fa3c
14
src/a2pid.c
14
src/a2pid.c
@ -603,6 +603,20 @@ void main(int argc, char **argv)
|
||||
write(kbdfd, &uidev, sizeof(uidev));
|
||||
if (ioctl(kbdfd, UI_DEV_CREATE) < 0)
|
||||
die("error: ioctl DEV_CREATE");
|
||||
/*
|
||||
* Set repeat delay values that make sense.
|
||||
*/
|
||||
bzero(&evkey, sizeof(evkey));
|
||||
evkey.type = EV_REP;
|
||||
evkey.code = REP_DELAY;
|
||||
evkey.value = 500; /* 0.5 sec delay */
|
||||
if (write(kbdfd, &evkey, sizeof(evkey)) < 0)
|
||||
die("error: REP_DELAY");
|
||||
evkey.type = EV_REP;
|
||||
evkey.code = REP_PERIOD;
|
||||
evkey.value = 100; /* 10 reps/sec */
|
||||
if (write(kbdfd, &evkey, sizeof(evkey)) < 0)
|
||||
die("error: REP_PERIOD");
|
||||
/*
|
||||
* Create mouse input device
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user