hyprwm / Hyprland

Hyprland is an independent, highly customizable, dynamic tiling Wayland compositor that doesn't sacrifice on its looks.
https://hyprland.org
BSD 3-Clause "New" or "Revised" License
19.7k stars 835 forks source link

Tablet transform not getting applied #4856

Open asiantuntija opened 6 months ago

asiantuntija commented 6 months ago

Hyprland Version

System/Version info ```sh Hyprland, built from branch main at commit f7a34534873bf499fc1a04a5fa25ada03c4ee415 dirty (socket2: move to the wayland event loop). Date: Mon Feb 26 18:20:51 2024 Tag: v0.35.0-103-gf7a34534 flags: (if any) ```

Bug or Regression?

Bug

Description

Trying to transform tablet orientation doesn't change anything when changing the value between 0-7. relative_input variable works so I should be targeting the correct device.

How to reproduce

Use a drawing board and change input:tablet:transform variable, nothing happens

Crash reports, logs, images, videos

No response

gfhdhytghd commented 6 months ago

sameproblem, for touchscreen

thejch commented 6 months ago

Having a similar issue. This is a regression, looks like it was https://github.com/hyprwm/Hyprland/commit/13f6f0b923ff3ec94a3bec886c28b90402ceef91 that broke it

ppenguin commented 6 months ago

Also stopped working for me, though I can't say around when more precicely (some time in the last months) I used to have a working service that took the orientation from iio sensors and applied it via:

monitor-sensor \
  | awk ' $4 ~ /bottom-up/ { print "2" }; $4 ~ /left-up/ { print "1" }; $4 ~ /normal/ { print "0" }; $4 ~ /right-up/ { print "3" }; { system("") };' \
          | xargs -rI{} hyprctl --batch "keyword device:elan2514:00-04f3:29f5:transform {} ; keyword device:elan2514:00-04f3:29f5-stylus:transform {} ; keyword monitor eDP-1,transform,{}"

Isolated:

> hyprctl --batch "keyword touch:elan2514:00-04f3:29f5:transform 3"
config option <touch:elan2514:00-04f3:29f5:transform> does not exist.

@thejch would this help to confirm that the culprit is the commit you pointed out?

thejch commented 6 months ago

Also stopped working for me, though I can't say around when more precicely (some time in the last months) I used to have a working service that took the orientation from iio sensors and applied it via:

monitor-sensor \
  | awk ' $4 ~ /bottom-up/ { print "2" }; $4 ~ /left-up/ { print "1" }; $4 ~ /normal/ { print "0" }; $4 ~ /right-up/ { print "3" }; { system("") };' \
          | xargs -rI{} hyprctl --batch "keyword device:elan2514:00-04f3:29f5:transform {} ; keyword device:elan2514:00-04f3:29f5-stylus:transform {} ; keyword monitor eDP-1,transform,{}"

Isolated:

> hyprctl --batch "keyword touch:elan2514:00-04f3:29f5:transform 3"
config option <touch:elan2514:00-04f3:29f5:transform> does not exist.

@thejch would this help to confirm that the culprit is the commit you pointed out?

Seems that the config syntax has changed. Try keyword input:touchdevice:transform 3

ppenguin commented 6 months ago

@thejch Thanks, that works!

vaxerski commented 6 months ago

wait so is this actually a problem or just people not updating their config?

asiantuntija commented 6 months ago

Reading wiki this should work?


input {
tablet {
      relative_input = true
      transform = 5
 }
}

Relative input works but transform doesn't. I also tried under touchdevice but that did nothing either, anything I'm missing here?

edit: hyprctl devices

Tablets:
    Tablet at 5ebd26e33e60:
        wacom-one-by-wacom-m-pen

edit2: I tried mapping a region for the tablet, that worked, but after removing the setting from the config file the region stays active and doesn't get returned to 0,0 and full size.

edit3: Also probably not related to https://github.com/hyprwm/Hyprland/issues/5172 as input:tablet:transform doesn't work but input:tablet:relative_output works.

asiantuntija commented 6 months ago

https://github.com/hyprwm/Hyprland/pull/5178 works for my use case, however there might be some situations where you would like to turn the tablet 90 degrees and get it flipped etc, so fixing this at some point might be a good idea.