Switch `enable/disable touchpad` in function keys

Solution 1:

You can easily use fn + f4 to enable/disable the touchpad. First of all, you should remap your keyboard as follows:

  1. Open or create the file: ~/.Xmodmap
  2. Add this line: keycode 93 = XF86TouchpadToggle NoSymbol XF86TouchpadToggle
  3. Reload the xmodmap: xmodmap ~/.Xmodmap

Now you can use fn + f4 to toggle the touchpad.

More info: https://wiki.archlinux.org/title/MSI_P15