Enabling the touchpad scrolling in VSCode (or electron apps) on Lenovo laptops


The touchpad scrolling on VSCode behaves like arrow keys:

  • When I scroll, the caret moves up or down instead of the scrollbar.
  • When I scroll with Ctrl key pressed, the scrollbar moves. Probably its because Ctrl+(Up|Down) is assigned to the scrolling in the default setting of VSCode.

Moreover, the scrolling on the tooltip does not work, so I had to drag&drop the scrollbar (troublesome!)

A hacky solution is suggested here:
It works, but the renaming can cause the problem in the automatic update, so I wanted a natural solution to this issue. And this situation of the task manager is terrible

My environment


Rewrite the registry and make the touchpad driver recognize that Code.exe has to be treated as an electron app.
Of course, it is strongly recommended to make a restoring point of System Restore, get the bitlocker key, and take the backup of the registry entry.

1. Open regedit.exe
2. Find "APOptimize" by searching, and go to "Google Chrome Browser" below. In my environment, it is at

HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Elantech\APOptimize\Google Chrome Browser

3. Export the entry of "Google Chrome Browser", and save it.
4. Open the exported registry file by an editor and rewrite it like this (do not change "Option" and "Scroll":

Windows Registry Editor Version 5.00


5. Apply the modified registry file to the system.
6. Reboot. It should work.

How I solved it

According to the hacky solution above, the driver changes the behavior depending on the filename, so I run "ag chrome" in the driver directory, then I found it is writing about chrome things in the registry.