ajgraves Now I need to figure out how to get the keys to trigger it

Run xev. The keys should show up as XF86...
Or, run this script:

#!/bin/sh
#
# showkey.sh: de-clutter xev(1) key output.

exec xev -event keyboard | awk '
BEGIN {
	RS = ""
}
/^Key(Press|Release) / {
	l = $0
	sub(/ event.+keysym 0x[[:xdigit:]]+,/, "", l);
	sub(/\), .+$/, "", l)
	print l
}'

ajgraves I will email you.

Got it.

ajgraves I'm a long-time ARPA member.

Same here.

    rvp Or, run this script

    Thanks! The audio up/down keys are captured, but unfortunately the brightness keys are not. I have a work around though, I did keyboard shortcuts in xfce for Ctrl+Alt+Shift++ and - for brightness up/down. I'll work on audio later but at least I know how to see what keys to attempt to capture there. Curiously, xfce4-mixer appears to be missing from packages.

    • rvp replied to this.

      ajgraves The audio up/down keys are captured, but unfortunately the brightness keys are not.

      Yeah. I thought it was HW-dependent, but that doesn't appear to be the case: the kernel doesn't pass those keys up to userspace on my laptop either.

      rvp 2-finger scrolling: This works only on some touchpads

      Do we know which trackpad's inarticular are supported?

      ajgraves I haven't installed OpenBSD on this machine yet, but it just works on my other Lenovo hardware. I wonder what's different in their setup/driver.

      I'd be interested to know the conclusion here, ie. is it a different trackpad or does OpenBSD have more driver support for more trackpads?

        pfr I'd be interested to know the conclusion here, ie. is it a different trackpad or does OpenBSD have more driver support for more trackpads?

        I'm still tinkering with NetBSD on this particular machine. To be fair, the trackpad is very different from that on my other Lenovo systems. If I decided to put OpenBSD on it I'll report back on how it functions there.

        • pfr replied to this.
        • pfr likes this.

          pfr most likely what I’m going to do is buy another SSD for mine. I already did that, but realized that the X1 Carbon I got doesn’t support NVMe 🤣 so I’m going to return the one I bought and get a regular m.2 sata SSD. Once I’ve done that I’ll drop OpenBSD on it.

          • pfr likes this.

          pfr Do we know which trackpad's inarticular are supported?

          You're asking a guy who goes out of his way to disable his touchpad ...?

          Aside from grovelling through the source and xref'ing against the datasheets, I dunno. Try it and see, I guess. See here. Same manufacturer, but different models: his works, mine doesn't.

            rvp two-finger scroling is an abomination and against the laws of what's physically possible, just like bumblebees can fly 😉

            pfr sys/dev/pckbport/synaptics.c attempts to scroll based on Synaptics' "finger width detection". It was intended to be the case in NetBSD that scrolling is activated when two fingers are held together on the pad. Synaptics basically broke this feature in their hardware at some point (my hardware's reported figures oscillate horribly). Try lowering sysctl hw.synaptics.finger_scroll-min then holding two fingers together on the pad. It might work for you!

            In comparison, sys/dev/pckbport/elantech.c scrolls when two fingers are detected on the pad, regardless of their proximity. This is much easier to do and much cleaner. Briefly, the synaptics driver did this, but I had to revert it because it broke other gestures that are required on trackpads that lack buttons entirely, and I don't have hardware to test those (check the CVS history). I'm happy with arrow keys and trackpoint scrolling, tbh.

            Anyway, this is probably also possible to emulate using Xorg's mousedrv(4) - see the EmulateWheel option.

            Some reading https://marc.info/?l=netbsd-current-users&m=158450374625332&w=2

              nia to emulate using Xorg's mousedrv(4)

              There you go: excellent suggestion.
              It works!:

              $ cat /etc/X11/xorg.conf.d/mouse.conf
              Section "InputDevice"
                  Identifier  "Mouse0"
                  Driver      "mouse"
                  Option      "Device" "/dev/wsmouse"
                  Option      "EmulateWheel" "on"
                  Option      "EmulateWheelButton" "3"
                  Option      "YAxisMapping" "4 5"
              EndSection
              $

              Right click, then up & down to scroll.

                nia Try lowering sysctl hw.synaptics.finger_scroll-min then holding two fingers together on the pad. It might work for you!

                Unfortunately that didn’t work, but thank you for the suggestion and the history into the driver!

                rvp Right click, then up & down to scroll.

                Alright so that seems to get it to work! However because of the right click first, it requires some awkward 3-finger movement on the trackpad that I’ll need to get used to. Any thoughts on accomplishing this without the right click first? Not sure that wouldn’t cause new problems.

                • rvp replied to this.

                  ajgraves Any thoughts on accomplishing this without the right click first?

                  I had a feeling this would come up...

                  You could map one of the useless keys (how 'bout the Menu key?) to mouse-button 4, then use that instead.

                  pfr You can use other mouse buttons--the middle one:

                      Option      "EmulateWheelButton" "2"

                    rvp
                    Oh damn, I didn't realise I needed to hold down the right mouse button!
                    Ok it works, Cheers. I'll set it to te middle button

                    EDIT:

                    Here's a curve ball for ya.. Is there a way to set tablet scrolling mode? ie. opposite direction scrolling, swipe up on trackpad scrolls the page down and vice versa. YAxisMapping perhaps?

                      pfr Is there a way to set tablet scrolling mode?

                      Try:

                      Option      "YAxisMapping" "5 4"

                      Ie. switch the numbers around.

                      • pfr replied to this.

                        pfr opposite direction scrolling, swipe up on trackpad scrolls the page down and vice versa.

                        Now we're really getting weird 😆

                          pin No, for scrolling it's surprisingly more intuitive. Try it.