Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Touchpad buttons have reversed #4387

Closed
Jamedjo opened this issue Jul 27, 2019 · 5 comments · Fixed by #4394
Closed

Touchpad buttons have reversed #4387

Jamedjo opened this issue Jul 27, 2019 · 5 comments · Fixed by #4394

Comments

@Jamedjo
Copy link
Contributor

Jamedjo commented Jul 27, 2019

What

Using the left touchpad button has randomly started causing a right click and vice versa.

When

I'm not sure of the cause and will close this issue if I can't reproduce it after a restart. It didn't occur previously so could have started after updating sway, but I think it was working when I first started sway this session.

My current commit is formed by merging origin/layer-shell-popups into master at e4bba90, so it could also be to do with that. Previously I was on 36aa67e (master from 17th July) with wlroots at df3f0ffb (master June 28th).

@Jamedjo
Copy link
Contributor Author

Jamedjo commented Jul 27, 2019

@RedSoxFan Could this be related to #4342?

@RedSoxFan
Copy link
Member

@RedSoxFan Could this be related to #4342

Uh, it's possible. That sounds like left handed mode. What's your input config and the output of swaymsg -rt get_inputs?

@Jamedjo
Copy link
Contributor Author

Jamedjo commented Jul 28, 2019

What's your input config

https://github.com/Jamedjo/dotfiles/blob/master/sway/config

That sounds like left handed mode ... output of swaymsg -rt get_inputs?

I noticed that setting and did try running disabled commands but it had no effect. Looking at get_inputs as you suggested confirms this is the problem with "left_handed": "enabled" somehow having been set:

swaymsg -rt get_inputs
[
  {
    "identifier": "1:1:AT_Translated_Set_2_keyboard",
    "name": "AT Translated Set 2 keyboard",
    "vendor": 1,
    "product": 1,
    "type": "keyboard",
    "xkb_layout_names": [
      "English (UK)"
    ],
    "xkb_active_layout_index": 0,
    "xkb_active_layout_name": "English (UK)",
    "libinput": {
      "send_events": "enabled"
    }
  },
  {
    "identifier": "0:0:Dell_WMI_hotkeys",
    "name": "Dell WMI hotkeys",
    "vendor": 0,
    "product": 0,
    "type": "keyboard",
    "xkb_layout_names": [
      "English (UK)"
    ],
    "xkb_active_layout_index": 0,
    "xkb_active_layout_name": "English (UK)",
    "libinput": {
      "send_events": "enabled"
    }
  },
  {
    "identifier": "0:0:Intel_HID_5_button_array",
    "name": "Intel HID 5 button array",
    "vendor": 0,
    "product": 0,
    "type": "keyboard",
    "xkb_layout_names": [
      "English (UK)"
    ],
    "xkb_active_layout_index": 0,
    "xkb_active_layout_name": "English (UK)",
    "libinput": {
      "send_events": "enabled"
    }
  },
  {
    "identifier": "0:0:Intel_HID_events",
    "name": "Intel HID events",
    "vendor": 0,
    "product": 0,
    "type": "keyboard",
    "xkb_layout_names": [
      "English (UK)"
    ],
    "xkb_active_layout_index": 0,
    "xkb_active_layout_name": "English (UK)",
    "libinput": {
      "send_events": "enabled"
    }
  },
  {
    "identifier": "1739:31251:SYNA2393:00_06CB:7A13_Touchpad",
    "name": "SYNA2393:00 06CB:7A13 Touchpad",
    "vendor": 1739,
    "product": 31251,
    "type": "touchpad",
    "libinput": {
      "send_events": "enabled",
      "tap": "enabled",
      "tap_button_map": "lrm",
      "tap_drag": "enabled",
      "tap_drag_lock": "disabled",
      "accel_speed": 0.80000001192092896,
      "accel_profile": "none",
      "natural_scroll": "enabled",
      "left_handed": "enabled",
      "click_method": "button_areas",
      "middle_emulation": "disabled",
      "scroll_method": "two_finger",
      "dwt": "enabled"
    }
  },
  {
    "identifier": "1386:18574:Wacom_HID_488E_Finger",
    "name": "Wacom HID 488E Finger",
    "vendor": 1386,
    "product": 18574,
    "type": "touch",
    "libinput": {
      "send_events": "enabled",
      "calibration_matrix": [
        1.0,
        0.0,
        0.0,
        0.0,
        1.0,
        0.0
      ]
    }
  },
  {
    "identifier": "1386:18574:Wacom_HID_488E_Pen",
    "name": "Wacom HID 488E Pen",
    "vendor": 1386,
    "product": 18574,
    "type": "tablet_tool",
    "libinput": {
      "send_events": "enabled",
      "accel_speed": 0.0,
      "accel_profile": "none",
      "calibration_matrix": [
        1.0,
        0.0,
        0.0,
        0.0,
        1.0,
        0.0
      ]
    }
  },
  {
    "identifier": "0:3:Sleep_Button",
    "name": "Sleep Button",
    "vendor": 0,
    "product": 3,
    "type": "keyboard",
    "xkb_layout_names": [
      "English (UK)"
    ],
    "xkb_active_layout_index": 0,
    "xkb_active_layout_name": "English (UK)",
    "libinput": {
      "send_events": "enabled"
    }
  },
  {
    "identifier": "0:5:Lid_Switch",
    "name": "Lid Switch",
    "vendor": 0,
    "product": 5,
    "type": "switch",
    "libinput": {
      "send_events": "enabled"
    }
  },
  {
    "identifier": "0:1:Power_Button",
    "name": "Power Button",
    "vendor": 0,
    "product": 1,
    "type": "keyboard",
    "xkb_layout_names": [
      "English (UK)"
    ],
    "xkb_active_layout_index": 0,
    "xkb_active_layout_name": "English (UK)",
    "libinput": {
      "send_events": "enabled"
    }
  },
  {
    "identifier": "0:6:Video_Bus",
    "name": "Video Bus",
    "vendor": 0,
    "product": 6,
    "type": "keyboard",
    "xkb_layout_names": [
      "English (UK)"
    ],
    "xkb_active_layout_index": 0,
    "xkb_active_layout_name": "English (UK)",
    "libinput": {
      "send_events": "enabled"
    }
  },
  {
    "identifier": "0:6:Video_Bus",
    "name": "Video Bus",
    "vendor": 0,
    "product": 6,
    "type": "keyboard",
    "xkb_layout_names": [
      "English (UK)"
    ],
    "xkb_active_layout_index": 0,
    "xkb_active_layout_name": "English (UK)",
    "libinput": {
      "send_events": "enabled"
    }
  },
  {
    "identifier": "0:1:Power_Button",
    "name": "Power Button",
    "vendor": 0,
    "product": 1,
    "type": "keyboard",
    "xkb_layout_names": [
      "English (UK)"
    ],
    "xkb_active_layout_index": 0,
    "xkb_active_layout_name": "English (UK)",
    "libinput": {
      "send_events": "enabled"
    }
  }
]

Attempts to disable it are still failing but my syntax might be wrong:

~» swaymsg 'input * left_handed disable'
~» swaymsg 'input "1739:31251:SYNA2393:00_06CB:7A13_Touchpad" left_handed disable' 
~» swaymsg -rt get_inputs | grep left                                             
      "left_handed": "enabled",
~» swaymsg input "1739:31251:SYNA2393:00_06CB:7A13_Touchpad" left_handed disable 
~» swaymsg -rt get_inputs | grep left                                            
      "left_handed": "enabled",
~» swaymsg input "SYNA2393:00_06CB:7A13_Touchpad" left_handed disable 
~» swaymsg -rt get_inputs | grep left                                           
      "left_handed": "enabled",
~» swaymsg input "SYNA2393:00 06CB:7A13 Touchpad" left_handed disable
Error: Unknown/invalid command '06CB:7A13'

@RedSoxFan
Copy link
Member

Yup, it was my fault. Had a typo in my refactor. Sorry about that. See #4394

@Jamedjo
Copy link
Contributor Author

Jamedjo commented Jul 28, 2019

Thanks for the prompt fix 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

2 participants