mohamed-badaoui / asus-touchpad-numpad-driver

Activate Numpad inside the touchpad with top right corner switch
299 stars 70 forks source link

UM5302LA Touchpad Workaround #113

Open SaNch0sE opened 11 months ago

SaNch0sE commented 11 months ago

I have Asus Zenbook S13 OLED 2023 Ryzen 7840U version - UM5302LA On my laptop this driver works well, but I had few issues, that I fixed by changing asus_touchpad.py

  1. My touchpad has only 2 states (or maybe another brightness values), so what I did is deleted the value that didn't do anything (line 147):
    
    # Brightness 31: Low (deleted), 24: Half, 1: Full

BRIGHT_VAL = [hex(val) for val in [24, 1]]

  1.a. Also, I changed default level of brightness, so touchpad led is on when I'm enabling numpad (line 203):

Set default level of brightness to ON state

brightness: int = 1

2. Calculator key and palm rejection
  2.a. Calculator key - probably Gnome issue, but need to mention - I didn't have shortcut for calculator, so I set it manually
  2.b. Due to some palm rejection issues, I changed logic for calculator key on touchpad (line 260):
  ```py
            # Check if caclulator was hit #
            elif (x < 0.06 * maxx) and (y < 0.07 * maxy):
                if numlock:
            #       Disabling old logic, because touchpad doesn't have brightness levels
            #       brightness = change_brightness(brightness)
            #
            #       Launch calculator only when numpad is on
                    launch_calculator()
                else:
                    pass
                continue

After this fixes, touchpad\numpad is working great