kEYBoard lOCkout? [SOLVED]

What works, and doesn't, for you. Be specific, and please include Puppy version.
Post Reply
Message
Author
User avatar
Marv
Posts: 1264
Joined: Wed 04 May 2005, 13:47
Location: SW Wisconsin

kEYBoard lOCkout? [SOLVED]

#1 Post by Marv »

Is there any way to lock out the keyboard completely and unlock it again? If the touchpad and buttons were still live I could invoke it from the desktop. Odd question I know but I have a new kitten :?
Last edited by Marv on Thu 29 Dec 2016, 00:14, edited 1 time in total.
Pups currently in kennel :D Older LxPupSc and X-slacko-4.4 for my users; LxPupSc, LxPupSc64 and upupEF for me. All good pups indeed, and all running savefiles for look'n'feel only. Browsers, etc. solely from SFS.

User avatar
don570
Posts: 5528
Joined: Wed 10 Mar 2010, 19:58
Location: Ontario

#2 Post by don570 »

Try slock

The keyboard will still allow a password to be entered once it is invoked.

http://www.murga-linux.com/puppy/viewtopic.php?t=80622

User avatar
drunkjedi
Posts: 882
Joined: Mon 25 May 2015, 02:50

#3 Post by drunkjedi »

Run following in a terminal

Code: Select all

xinput -list
It should output like....

Code: Select all

 xinput -list
⎡ Virtual core pointer                    	id=2	[master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer              	id=4	[slave  pointer  (2)]
⎜   ↳ ImPS/2 Generic Wheel Mouse              	id=10	[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)]
    ↳ Power Button                            	id=8	[slave  keyboard (3)]
    ↳ AT Translated Set 2 keyboard            	id=9	[slave  keyboard (3)]
The last line shows my keyboard and it's id=9. Note down that id number for your keyboard.

Now make two scripts.

1) disable_kb

Code: Select all

xinput set-prop 9 'Device Enabled' 0
And

2) enable_kb

Code: Select all

xinput set-prop 9 'Device Enabled' 1
Change the number 9 in both scripts to whatever id you have for keyboard.

Make shortcut on desktop for them, for easy clicking...

I don't know for touchpad as I do not have a laptop to test, But works with a mouse.

Done. Click away...

User avatar
Marv
Posts: 1264
Joined: Wed 04 May 2005, 13:47
Location: SW Wisconsin

#4 Post by Marv »

@drunkjedi
THANKS! Works perfectly. In LxPupSc I needed to install xinput but it was right there in the PPM repo. My keyboard ID is 8. Made a couple of .desktops instead of the scripts so I could easily put it in the lower lxde panel with icons and I have instant keyboardless browsing when needed. Touchpad and buttons are unaffected so switching it back on is fine.

Now of course the kitten will ignore me :) Nope, just cat tested and it's catproof indeed.

Edited: To reflect cat testing and then putting it all in .desktops.
Pups currently in kennel :D Older LxPupSc and X-slacko-4.4 for my users; LxPupSc, LxPupSc64 and upupEF for me. All good pups indeed, and all running savefiles for look'n'feel only. Browsers, etc. solely from SFS.

Post Reply