Coder Social home page Coder Social logo

ndtoan96 / asus-touchpad-numpad-driver Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mohamed-badaoui/asus-touchpad-numpad-driver

0.0 0.0 0.0 840 KB

Activate Numpad inside the touchpad with top right corner switch

Shell 25.03% Python 74.97%

asus-touchpad-numpad-driver's Introduction

Asus touchpad numpad driver

Without % = symbols With % = symbols With % = symbols (but incompatible with the non-universal version)
Model/Layout = ux433fa Model/Layout = m433ia Model/Layout = ux581l
without % = symbols with % = symbols model ux581

This is a python service which enables switching between numpad and touchpad for the Asus UX433. It may work for other models. When running the script, use as an argument one of the strings ux433fa or m433ia or `ux581l to select the layout that fits your touchpad. You can inspect the different layouts here.

This python driver has been tested and works fine for these asus versions at the moment:

  • E210MA (with % and = symbols)
  • M433IA (with % and = symbols)
  • R424DA (without extra symbols)
  • ROG Strix G15 2021
  • S413DA (with % and = symbols)
  • TM420 (with % and = symbols)
  • UM425I (with % and = symbols)
  • UM425IA (with % and = symbols)
  • UM425UA (with % and = symbols)
  • UM431DA (without extra symbols)
  • UM433DA (with % and = symbols)
  • UX425EA (with % and = symbols)
  • UX425JA (with % and = symbols)
  • UX434FA (with % and = symbols)
  • UX463FL (with % and = symbols)
  • UX463FA (with % and = symbols)
  • UM462DA (without extra symbols)
  • UX433 (without extra symbols)
  • UX431F (without extra symbols)
  • UX393 (with % and = symbols)
  • UX371E (With % and = symbols)
  • UX362-FA (without extra symbols)
  • UX363EA (with % and = symbols)
  • UX363JA (with % and = symbols)
  • UX333FA (without extra symbols)
  • UX325EA (with % and = symbols)
  • UM325UA (with % and = symbols)
  • X412DA (without extra symbols)
  • UX581L (with % and = symbols)
  • Zephyrus S GX701 (with % and = symbols)

Install required packages

  • Debian / Ubuntu / Linux Mint / Pop!_OS / Zorin OS:
sudo apt install libevdev2 python3-libevdev i2c-tools git
  • Arch Linux / Manjaro:
sudo pacman -S libevdev python-libevdev i2c-tools git
  • Fedora:
sudo dnf install libevdev python-libevdev i2c-tools git
  • NixOS:

Add these to your /etc/nixos/configuration.nix:

# i2c for https://github.com/mohamed-badaoui/asus-touchpad-numpad-driver
hardware.i2c.enable = true;
systemd.services.asus-touchpad-numpad = {
  description = "Activate Numpad inside the touchpad with top right corner switch";
  documentation = ["https://github.com/mohamed-badaoui/asus-touchpad-numpad-driver"];
  path = [ pkgs.i2c-tools ];
  script = ''
    cd ${pkgs.fetchFromGitHub {
      owner = "mohamed-badaoui";
      repo = "asus-touchpad-numpad-driver";
      # These needs to be updated from time to time
      rev = "d80980af6ef776ee6acf42c193689f207caa7968";
      sha256 = "sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=";
    }}
    # In the last argument here you choose your layout.
    ${pkgs.python3.withPackages(ps: [ ps.libevdev ])}/bin/python asus_touchpad.py ux433fa
  '';
  # Probably needed because it fails on boot seemingly because the driver
  # is not ready yet. Alternativly, you can use `sleep 3` or similar in the
  # `script`.
  serviceConfig = {
    RestartSec = "1s";
    Restart = "on-failure";
  };
  wantedBy = [ "multi-user.target" ];
};

Then enable i2c

sudo modprobe i2c-dev
sudo i2cdetect -l

Now you can get the latest ASUS Touchpad Numpad Driver for Linux from Git and install it using the following commands.

git clone https://github.com/mohamed-badaoui/asus-touchpad-numpad-driver
cd asus-touchpad-numpad-driver
sudo ./install.sh

To turn on/off numpad, tap top right corner touchpad area. To adjust numpad brightness, tap top left corner touchpad area.

To uninstall, just run:

sudo ./uninstall.sh

Troubleshooting

To activate logger, do in a console:

LOG=DEBUG sudo -E ./asus_touchpad.py

For some operating systems with boot failure (Pop!OS, Mint, ElementaryOS, SolusOS), before installing, please uncomment in the asus_touchpad.service file, this following property and adjust its value:

# ExecStartPre=/bin/sleep 2

It is an adaptation made thanks to:

For any question, please do not hesitate to follow this tread discussion (https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1810183)

Thank you very much to all the contributors, mainly on launchpad, who made this device driver possible. (Kawaegle, David/magellan-2000, Pilot6/hanipouspilot, Julian Oertel /clunphumb, YannikSc and so many others. GG!)

asus-touchpad-numpad-driver's People

Contributors

mohamed-badaoui avatar gregoire-perso avatar brotzeller avatar doronbehar avatar karledwards1 avatar yanniksc avatar ndtoan96 avatar tobfos2611 avatar pinkflozd avatar moisespr123 avatar jezek avatar alinaqihassan avatar vkehayas avatar techieboy avatar oschwede avatar kawaegle avatar dziedzic99 avatar glebtv avatar fadamatiik avatar adlererik avatar santonclause avatar 0vj avatar adrianskar avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.