Date: Tue, 28 Jun 2022 13:00:10 +0300 From: Vladimir Kondratyev <vladimir@kondratyev.su> To: freebsd-current@freebsd.org Subject: Re: RES: iichid/hms keyboard/mouse wrongly reattached to uhid/ums Message-ID: <468d9dad-bd67-f6c7-8b2a-e9e4fa738f64@kondratyev.su> In-Reply-To: <CP6P284MB1900D897C491325B077261A4CBB89@CP6P284MB1900.BRAP284.PROD.OUTLOOK.COM> References: <CP6P284MB1900818F505F78F68EC4C6BECBB99@CP6P284MB1900.BRAP284.PROD.OUTLOOK.COM> <8674be8f-b4fb-008d-9318-2184285b46a8@kondratyev.su> <CP6P284MB1900CC44A149706DDC43CADDCBB99@CP6P284MB1900.BRAP284.PROD.OUTLOOK.COM> <CP6P284MB1900D897C491325B077261A4CBB89@CP6P284MB1900.BRAP284.PROD.OUTLOOK.COM>
next in thread | previous in thread | raw e-mail | index | archive | help
On 28.06.2022 09:59, Ivan Quitschal wrote: > > Hi Vladimir / All, > > Just a question in case you guys know how. > Problem is fixed , nothing about that, but after the keyboard is detached and reattached , I > always have to do another "kbdcontrol -r fast" myself for it to get back to the speed I use. > I've tried to call this command from within devd.conf alongside moused, but no success. > Any ideas ? > May be DE overrides repeat rate for you? Anyway, it is possible to change repeat rate through evdev interface. Following snippet of code illustrates a way to do that: #include <sys/ioctl.h> #include <dev/evdev/input.h> #include <fcntl.h> #include <stdio.h> #include <stdlib.h> #include <unistd.h> void usage(void) { printf("usage: eviocresp /dev/input/event0\n"); } int main(int argc, char** argv) { int fd = 0; int rep[2] = {0, 0}; if (argc < 2) { usage(); exit(0); } if ((fd = open(argv[1], O_RDWR)) < 0) { perror("unable to access file, exiting"); exit(1); } /* get current auto-repeat args. */ if (ioctl(fd, EVIOCGREP, rep)) { perror("unable to set delay and repeat rate for input devices"); exit(1); } /* set auto-repeat rate as 0. */ rep[1] = 0; if (ioctl(fd, EVIOCSREP, rep)) { perror("unable to set delay and repeat rate for input devices"); exit(1); } printf("rep[0]:%d;rep[1]:%d\n", rep[0], rep[1]); close(fd); } -- WBR Vladimir Kondratyev
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?468d9dad-bd67-f6c7-8b2a-e9e4fa738f64>