Re: Ergonomic USB wired mouse
> dmesg | grep "uhid. at uhidev4" Yepp, this one is good for manual device identification, but I was hoping for a more direct way to be used in a hotplugd script, executed on each device attachment, to avoid any race conditions and peaks of high load (on a physical USB hub with multiple HID devices there could be dozens of uhid instances that are all reported at the same moment when a hub is attached). But it looks like there's no way at this moment to get this info apart from dmesg. Ideally hotplugd would allow to filter devs by vendor/product (as devd in FreeBSD) or at least to report them. It looks like hotplug(4) could be rather easily extended to also report parent (like in hotplug_device_attach(cd->cd_class, dev->dv_xname, *parent*) at 407@sys/kern/subr_autoconf.c) and maybe even bus so hotplugd could be extended to query all properties of the reported device. Regards, Anatoli On 25/8/19 12:28, Bruno Flueckiger wrote: On 24.08., Anatoli wrote: Hi Bruno, AWESOME!! Thanks a lot! You can add "MX Vertical" to the list of the successfully tested pointing devices :D I just made some minor changes as this mouse only has 2 additional physical buttons (no secondary wheel, nor anything else). I removed the WAxis and lowered the button numbers on the ZAxis: Section "InputClass" Identifier "Logitech MX Vertical" MatchDriver "ws" Driver "ws" Option "Buttons" "16" Option "Device" "/dev/wsmouse" Option "Floating" "false" Option "ZAxisMapping" "6 7" EndSection And adjusted xmodmap: xmodmap -e "pointer = 1 2 3 8 9 4 5 6 7 10 11 12 13 14 15 16" This way everything works as expected! Nice! Thanks for reporting back your success. I like to read that my writing is useful to others. The mapping of the axes to the different buttons will vary for most devices. But if my article gave you what you needed to get it running yourself my goal is reached. Some time ago I also saw your other great guide about extra keys on USB keyboards (https://www.bsdhowto.ch/extrakeys.html) and used some ideas from it. I'd like to suggest one thing though: not to run usbhidaction from rc (it could be started under regular users from their WM startup scripts) and not to put the actual commands in the usbhidaction config, but rather to call from there xdotool for each button with the key codes to generate (e.g. "xdotool key XF86Mail" XF86LaunchA-Z, XF86AudioPlay/Stop, etc.) and then to capture them with xbindkeys. I do not use any X11 tools on purpose. It is my goal to describe a way that works independently from X11. If you exec programs directly by usbhidaction the way you launch it, they'd be executed under root and some users reading your guide may not understand the implications. Also this way it's impossible for each user to customize the actions. You're right about the security implications and the lack of multiuser support in my article. From a security perspective it is better to run usbhidaction as an unprivileged user. rc allows this by setting the user parameter like this: $ doas rcctl set user I've updated my article to include this setting. By the way it also solves some trouble when you try to send commands to other media players like moc (https://moc.daper.net/) which check for security. The lack multi user support is left to the reader as an exercise :-) I tried to go even further and to detect the keyboard when it's attached with hotplugd & usbdevs/lsusb (for vendor/product IDs), but then I couldn't solve the link between uhidev & uhid instances (https://marc.info/?l=openbsd-misc&m=156499209423144&w=2). Please let me know if you have any idea how to solve this. Regards, Anatoli I would try to grep the output of dmesg(8) for the uhids attached to the uhidev. Something like that should give you a list of uhid belonging to the uhidev that got just attached: dmesg | grep "uhid. at uhidev4" Cheers, Bruno
Re: Ergonomic USB wired mouse
On 24.08., Anatoli wrote: > Hi Bruno, > > AWESOME!! Thanks a lot! You can add "MX Vertical" to the list of the > successfully tested pointing devices :D > > I just made some minor changes as this mouse only has 2 additional physical > buttons (no secondary wheel, nor anything else). I removed the WAxis and > lowered the button numbers on the ZAxis: > > Section "InputClass" > Identifier "Logitech MX Vertical" > MatchDriver "ws" > Driver "ws" > Option "Buttons" "16" > Option "Device" "/dev/wsmouse" > Option "Floating" "false" > Option "ZAxisMapping" "6 7" > EndSection > > And adjusted xmodmap: > > xmodmap -e "pointer = 1 2 3 8 9 4 5 6 7 10 11 12 13 14 15 16" > > This way everything works as expected! Nice! > Thanks for reporting back your success. I like to read that my writing is useful to others. The mapping of the axes to the different buttons will vary for most devices. But if my article gave you what you needed to get it running yourself my goal is reached. > > Some time ago I also saw your other great guide about extra keys on USB > keyboards (https://www.bsdhowto.ch/extrakeys.html) and used some ideas from > it. I'd like to suggest one thing though: not to run usbhidaction from rc > (it could be started under regular users from their WM startup scripts) and > not to put the actual commands in the usbhidaction config, but rather to > call from there xdotool for each button with the key codes to generate (e.g. > "xdotool key XF86Mail" XF86LaunchA-Z, XF86AudioPlay/Stop, etc.) and then to > capture them with xbindkeys. > I do not use any X11 tools on purpose. It is my goal to describe a way that works independently from X11. > If you exec programs directly by usbhidaction the way you launch it, they'd > be executed under root and some users reading your guide may not understand > the implications. Also this way it's impossible for each user to customize > the actions. > You're right about the security implications and the lack of multiuser support in my article. From a security perspective it is better to run usbhidaction as an unprivileged user. rc allows this by setting the user parameter like this: $ doas rcctl set user I've updated my article to include this setting. By the way it also solves some trouble when you try to send commands to other media players like moc (https://moc.daper.net/) which check for security. The lack multi user support is left to the reader as an exercise :-) > I tried to go even further and to detect the keyboard when it's attached > with hotplugd & usbdevs/lsusb (for vendor/product IDs), but then I couldn't > solve the link between uhidev & uhid instances > (https://marc.info/?l=openbsd-misc&m=156499209423144&w=2). Please let me > know if you have any idea how to solve this. > > Regards, > Anatoli > I would try to grep the output of dmesg(8) for the uhids attached to the uhidev. Something like that should give you a list of uhid belonging to the uhidev that got just attached: dmesg | grep "uhid. at uhidev4" Cheers, Bruno
Re: Ergonomic USB wired mouse
Hi Bruno, AWESOME!! Thanks a lot! You can add "MX Vertical" to the list of the successfully tested pointing devices :D I just made some minor changes as this mouse only has 2 additional physical buttons (no secondary wheel, nor anything else). I removed the WAxis and lowered the button numbers on the ZAxis: Section "InputClass" Identifier "Logitech MX Vertical" MatchDriver "ws" Driver "ws" Option "Buttons" "16" Option "Device" "/dev/wsmouse" Option "Floating" "false" Option "ZAxisMapping" "6 7" EndSection And adjusted xmodmap: xmodmap -e "pointer = 1 2 3 8 9 4 5 6 7 10 11 12 13 14 15 16" This way everything works as expected! Nice! Some time ago I also saw your other great guide about extra keys on USB keyboards (https://www.bsdhowto.ch/extrakeys.html) and used some ideas from it. I'd like to suggest one thing though: not to run usbhidaction from rc (it could be started under regular users from their WM startup scripts) and not to put the actual commands in the usbhidaction config, but rather to call from there xdotool for each button with the key codes to generate (e.g. "xdotool key XF86Mail" XF86LaunchA-Z, XF86AudioPlay/Stop, etc.) and then to capture them with xbindkeys. If you exec programs directly by usbhidaction the way you launch it, they'd be executed under root and some users reading your guide may not understand the implications. Also this way it's impossible for each user to customize the actions. I tried to go even further and to detect the keyboard when it's attached with hotplugd & usbdevs/lsusb (for vendor/product IDs), but then I couldn't solve the link between uhidev & uhid instances (https://marc.info/?l=openbsd-misc&m=156499209423144&w=2). Please let me know if you have any idea how to solve this. Regards, Anatoli On 20/8/19 03:25, Bruno Flueckiger wrote: On 19.08., Anatoli wrote: I'm using Logitech MX Vertical. Nice mouse, IMO one of the most ergonomic ones though it needs some adaptation. It has 2 additional buttons which do NOT work on -current (better to say, they work like scrolling the wheel instead being left and right), I'd like to know how to make them work BTW. On Linux it works well. Oliver Marugg wrote: Hi I am preparing switching my desktop from another OS to OpenBSD. Is anyone using an Evoluent USB Wired Mouse (C/4 or 4 small) with OpenBSD? Or any other great ideas about an ergonomic mouse working with OpenBSD? Many thanks. -oliver I use the Logitech Performance MX trackball. Like Anatoli I had the problem that the two additional buttons behave like the scroll wheel. I solved this issue last year. You can find my how-to here: https://www.bsdhowto.ch/mousekeys.html Cheers, Bruno
Re: Ergonomic USB wired mouse
> Hi > > I am preparing switching my desktop from another OS to OpenBSD. Is > anyone using an Evoluent USB Wired Mouse (C/4 or 4 small) with OpenBSD? > Or any other great ideas about an ergonomic mouse working with OpenBSD? I have been using Evoluent USB 4 medium and small with OpenBSD without any problem for several years. Greetings, Damien Thiriet
Re: Ergonomic USB wired mouse
On 19.08., Anatoli wrote: > I'm using Logitech MX Vertical. Nice mouse, IMO one of the most ergonomic > ones though it needs some adaptation. It has 2 additional buttons which do > NOT work on -current (better to say, they work like scrolling the wheel > instead being left and right), I'd like to know how to make them work BTW. > On Linux it works well. > > Oliver Marugg wrote: > > Hi > > > > I am preparing switching my desktop from another OS to OpenBSD. Is > > anyone using an Evoluent USB Wired Mouse (C/4 or 4 small) with OpenBSD? > > Or any other great ideas about an ergonomic mouse working with OpenBSD? > > > > Many thanks. > > > > -oliver > > > I use the Logitech Performance MX trackball. Like Anatoli I had the problem that the two additional buttons behave like the scroll wheel. I solved this issue last year. You can find my how-to here: https://www.bsdhowto.ch/mousekeys.html Cheers, Bruno
Re: Ergonomic USB wired mouse
I'm using Logitech MX Vertical. Nice mouse, IMO one of the most ergonomic ones though it needs some adaptation. It has 2 additional buttons which do NOT work on -current (better to say, they work like scrolling the wheel instead being left and right), I'd like to know how to make them work BTW. On Linux it works well. Oliver Marugg wrote: Hi I am preparing switching my desktop from another OS to OpenBSD. Is anyone using an Evoluent USB Wired Mouse (C/4 or 4 small) with OpenBSD? Or any other great ideas about an ergonomic mouse working with OpenBSD? Many thanks. -oliver
Re: Ergonomic USB wired mouse
I am using the Logitech wireless with the trackball on the LEFT side. I would really like to use a second mouse at the same time for my left hand with a trackball on the RIGHT side. I don't like center ball mice. Anyone know of one of these? I like using a mouse for each hand. Chris Bennett
Re: Ergonomic USB wired mouse
Hello, On 08/19, Oliver Marugg wrote: > I am preparing switching my desktop from another OS to OpenBSD. Is anyone > using an Evoluent USB Wired Mouse (C/4 or 4 small) with OpenBSD? Or any > other great ideas about an ergonomic mouse working with OpenBSD? Most mouses should work, though I remember having problems with mouses that have more than 3 buttons (The extra buttons didnt do anything) I'm using the contour unimouse right now and it works great. Trackballs work as well. Have a nice day
Ergonomic USB wired mouse
Hi I am preparing switching my desktop from another OS to OpenBSD. Is anyone using an Evoluent USB Wired Mouse (C/4 or 4 small) with OpenBSD? Or any other great ideas about an ergonomic mouse working with OpenBSD? Many thanks. -oliver