Настройка touchpad

Здесь можно задавать любые вопросы по установке и настройке Lubuntu Linux

Модератор: Vadim


vit1967
Сообщения: 1
Зарегистрирован: 22 янв 2019, 16:31

Re: Настройка touchpad

#11

Сообщение vit1967 » 22 янв 2019, 16:37

На всякий кому надо просто быстрое временное отключение/включение тачпада в лубунте (чтоб мышке не мешала) сделал для себя саленький скриптик и 2 иконки:
cat touchpad.sh
#! /bin/sh

### touchpad on off
#sudo apt install xinput
# PROP Define by: xinput list
# ...поиск строки ...search string wiith num of
#Virtual core pointer id=2 [master pointer (3)]
#⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
#⎜ ↳ Logitech USB Receiver id=10 [slave pointer (2)]
#⎜ ↳ Logitech USB Receiver id=11 [slave pointer (2)]
#⎜ ↳ SynPS/2 Synaptics TouchPad id=14 [slave pointer (2)]
...becouse this num may be other onse
# ↳ SynPS/2 Synaptics TouchPad id=14x
# xinput |awk -F= '/TouchPad/ {print $2}'|awk '{print $1}'

#NUM=`/usr/bin/xinput |awk -F= '/TouchPad/ {print $2}'|awk '{print $1}'`

NUM=$(/usr/bin/xinput |awk -F= '/TouchPad/ {print $2}'|awk '{print $1}')
echo 'Touchpad='$NUM

case $1 in
start)
log_action_msg "Starting touchpad="${NUM}
/usr/bin/xinput set-prop ${NUM} "Device Enabled" 1
log_end_msg $?
;;
stop)
/usr/bin/xinput set-prop ${NUM} "Device Enabled" 0
;;
status)
/usr/bin/xinput list
exit 0
;;
*)
echo "Usage: $0 {start|stop|status}" >&2
/usr/bin/xinput list
exit 3
;;
esac

exit 0

....for stop/start I use this Icons .desktop:

cat Desktop/touchpad-off.desktop
[Desktop Entry]
# Translators: Add soft hyphens to your translations so that the icon view won't clip your translations. See https://bugzilla.gnome.org/show_bug.cgi?id=647087#c13 for details
Name=Mouse & Touch­pad
Comment=Change your mouse or touchpad sensitivity and select right or left-handed
Exec=/home/MyName/touchpad.sh stop
Icon=input-mouse
Terminal=true
Type=Application
NoDisplay=true
StartupNotify=true
Categories=GNOME;GTK;Settings;HardwareSettings;X-GNOME-Settings-Panel;X-GNOME-DevicesSettings;
OnlyShowIn=GNOME;Unity;
X-GNOME-Bugzilla-Bugzilla=GNOME
X-GNOME-Bugzilla-Product=gnome-control-center
X-GNOME-Bugzilla-Component=mouse
X-GNOME-Bugzilla-Version=3.26.2
# Translators: those are keywords for the mouse and touchpad control-center panel
Keywords=Trackpad;Pointer;Click;Tap;Double;Button;Trackball;Scroll;
X-Ubuntu-Gettext-Domain=gnome-control-center-2.0
Name[ru]=Touch­pad stop
</i>
....Other icon for "on" some, but with string
Exec=/home/MyName/touchpad.sh start

....on my laptop :

<i>
xinput
⎡ Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
⎜ ↳ Logitech USB Receiver id=10 [slave pointer (2)]
⎜ ↳ Logitech USB Receiver id=11 [slave pointer (2)]
⎜ ↳ SynPS/2 Synaptics TouchPad id=14 [slave pointer (2)]
⎣ Virtual core keyboard id=3 [master keyboard (2)]
↳ Virtual core XTEST keyboard id=5 [slave keyboard (3)]
↳ Power Button id=6 [slave keyboard (3)]
↳ Video Bus id=7 [slave keyboard (3)]
↳ Video Bus id=8 [slave keyboard (3)]
↳ Sleep Button id=9 [slave keyboard (3)]
↳ HP HD Webcam [Fixed]: HP HD Web id=12 [slave keyboard (3)]
↳ AT Translated Set 2 keyboard id=13 [slave keyboard (3)]
↳ HP Wireless hotkeys id=15 [slave keyboard (3)]
↳ HP WMI hotkeys id=16 [slave keyboard (3)]
↳ Logitech USB Receiver

Ответить