Take a look at our
ThinkPads.com HOME PAGE
For those who might want to contribute to the blog, start here: Editors Alley Topic
Then contact Bill with a Private Message

Useful improvement of x230 touchpad functionality

X230-X280, X390 Series
Post Reply
Message
Author
TOTAL
Freshman Member
Posts: 91
Joined: Thu Jan 05, 2017 12:09 pm
Location: London, UK

Useful improvement of x230 touchpad functionality

#1 Post by TOTAL » Wed Mar 27, 2024 9:09 pm

The trackpad's left button has stopped clicking so until I replace the keyboard, I have switched to using the touchpad. Never worked 100% reliably, with right button responding only to every second click and the left button becomes virtually sticky at times, but the greatest nuisance has always been the proneness to accidental touching while typing. There were some driver versions which tried to address that but never reliably.

So I have some up with an idea - and gemini put it to action - that the touchpad and its left click should only work when fn button is pressed. Makes you use the mouse as a minigun, so no drinking coffee while navigating the screen but it has become completely immune to accidental touches.

Here is how to do it.

1. Install autohotkey
2. create a file touchfreeze.ahk
3. modify its content with below code.
4. save the file and double-click it.

enjoy.


#NoEnv
SendMode Input

; State variable to keep track of whether Fn key is pressed
FnKeyPressed := 0

; Check if the Fn key (SC163) is being pressed
SC163::
FnKeyPressed := 1
BlockInput, MouseMoveOff ; Enable mouse input
SetTimer, DisableMouseInput, -1 ; Set a timer to disable mouse input after 1 ms
return

; Check if the Fn key (SC163) is being released
SC163 Up::
FnKeyPressed := 0
BlockInput, MouseMove ; Disable mouse input immediately
return

; Check if the left mouse button is pressed down
LButton::
if FnKeyPressed = 1
Send, {LButton Down}
return

; Check if the left mouse button is released
LButton Up::
Send, {LButton Up}
return

DisableMouseInput:
If !FnKeyPressed
BlockInput, MouseMove ; Disable mouse input
return

Post Reply
  • Similar Topics
    Replies
    Views
    Last post

Return to “ThinkPad X230-X280 / X390 Series”

Who is online

Users browsing this forum: No registered users and 6 guests