asus-touchpad-numpad-driver
asus-touchpad-numpad-driver copied to clipboard
[ALL] Auto detect the Asus model
Greetings.
I just got an E410MA, and I was happy to find your project to enable the numpad. This device has the % and = buttons, but when running the code as-is the calibration was a bit off, because there is an extra "dead" row on the top over the 7-8-9 keys.
In short, I was able to fix this with the edits below. As you see it is just a matter of adding an extra dead row on the top - I also expanded the "ON/OFF" button area in order to match the area covered by the symbol on the display.
Many thanks for making this driver available.
Michael
Device Information:
root@ares:~ # dmidecode | grep "Product Name"
Product Name: VivoBook_ASUS Laptop E410MA_E410MA
Product Name: E410MA
Code Changes:
@@ -190,3 +190,3 @@ while True:
e.value == 1 and
- (x > 0.95 * maxx) and (y < 0.05 * maxy)
+ (x > 0.90 * maxx) and (y < 0.20 * maxy)
):
@@ -207,4 +207,8 @@ while True:
try:
+ # zero (empty) row
+ if y < 0.2 * maxy:
+ # space is not enabled, so this intentionally does nothing
+ value = EV_KEY.KEY_SPACE
# first row
- if y < 0.25 * maxy:
+ elif y < 0.4 * maxy:
if x < 0.2 * maxx:
@@ -220,3 +224,3 @@ while True:
# second row
- elif y < 0.5 * maxy:
+ elif y < 0.6 * maxy:
if x < 0.2 * maxx:
@@ -232,3 +236,3 @@ while True:
# third row
- elif y < 0.75 * maxy:
+ elif y < 0.8 * maxy:
if x < 0.2 * maxx:
Hi,
Thank you for your contribution. I just checked the touchpad layout of your model and it seems a little different from the anothers i ve seen until now.
yours is with no bottom margin
but anothers have margin on top and on bottom too, as you can see for that model for example
So what we should do to be compliant with all models, is to identifiy all touchpad layouts first. Do not know where we could find such a list.
Hello again
I think this can be automated using the dmidecode | grep "Product Name" command. On my laptop it reports
Product Name: VivoBook_ASUS Laptop E410MA_E410MA
Product Name: E410MA
Hopefully anyone reading this with an ASUS can post their own results and confirm the type of numpad they have. Once you know a few popular models, you can change the installer to automate the process (at least as to the type of laptop) and have the installer print "If your laptop is not recognised, please report it at https://github.com/mohamed-badaoui/ux433-touchpad-numpad/issues/11 or something like that...
I'll be happy to help in any way possible
Cheers,
Michael