I don't know how the script works for you, but when the keyboard is locked
I can't move windows with the mouse.
In unity I create a launcher which uses xinput to disable and enable my input device.
eg Get the ID of your device...
Code:
glen@Quantal:~$ xinput -list
⎡ Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
⎜ ↳ Honey Bee Nostromo SpeedPad2 id=9 [slave pointer (2)]
⎜ ↳ Logitech USB Receiver id=13 [slave pointer (2)]
⎜ ↳ Logitech USB-PS/2 Optical Mouse id=11 [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)]
↳ Power Button id=7 [slave keyboard (3)]
↳ Honey Bee Nostromo SpeedPad2 id=8 [slave keyboard (3)]
↳ Logitech Logitech USB Headset id=10 [slave keyboard (3)]
↳ Logitech USB Receiver id=12 [slave keyboard (3)]
----
My keyboard ID=12
Create a .desktop file. Run in terminal ...
Code:
gedit ~/.local/share/applications/Catwalk.desktop
Copy and paste this into gedit.
Code:
[Desktop Entry]
Version=1.0
Type=Application
Terminal=false
Name=Catwalk
Comment=disable enable keyboard
Exec=/usr/bin/xinput --disable 12
Icon=/home/glen/Desktop/Scratch_cat_large.png
Categories=Utility;
Actions=enable;
[Desktop Action enable]
Name=Enable Keyboard
Exec=/usr/bin/xinput --enable 12
OnlyShowIn=Unity;
Edit the file to use your keyboard id
and the path to an icon.
Save the file.
Open the dash and type in "catwalk" and drag to the launcher.
Left click to disable the keyboard and right click to bring up the quicklist to enable.
It would be better to use a toggle on/off script but I don't
know how to get the disabled/enabled status of the keyboard.
Bookmarks