Is there a way to turn off the keyboard? {solved}

Using applications, configuring, problems
Message
Author
mini-jaguar
Posts: 597
Joined: Thu 13 Nov 2008, 13:45

Is there a way to turn off the keyboard? {solved}

#1 Post by mini-jaguar »

I guess it would have to be a graphic-based program controlled by mouse/touchpad, if it actually exists.

I know you can just unplug the keyboard, but I want to do this on a laptop.

If anybody thinks this is ridiculous, there is actually a way to turn off the touchpad and it is graphics/cursor based.
Last edited by mini-jaguar on Wed 30 Jan 2019, 09:24, edited 1 time in total.

User avatar
Burn_IT
Posts: 3650
Joined: Sat 12 Aug 2006, 19:25
Location: Tamworth UK

#2 Post by Burn_IT »

comment removed!!
"Just think of it as leaving early to avoid the rush" - T Pratchett

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#3 Post by musher0 »

Euh... unplug it? ;)
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

User avatar
Burn_IT
Posts: 3650
Joined: Sat 12 Aug 2006, 19:25
Location: Tamworth UK

#4 Post by Burn_IT »

On a LAPTOP???
"Just think of it as leaving early to avoid the rush" - T Pratchett

foxpup
Posts: 1132
Joined: Fri 29 Jul 2016, 21:08

#5 Post by foxpup »

Google it!

Maybe this:
1. Execute the command xinput list to list your input devices.
2. Locate AT Translated Set 2 keyboard and take note of its id number; this will be used to disable the keyboard. Also, take note of the number at the end, [slave keyboard (#)]; this is the id number of the master, which will be used to re-enable your keyboard.
3. To disable the keyboard, execute the command xinput float <id#>, where <id#> is your keyboard's id number. For example, if the id was 10, then the command would be xinput float 10.
4.To re-enable the keyboard, execute the command xinput reattach <id#> <master#>, where master is that second number we noted down. So if the number was 3, you would do xinput reattach 10 3.
from:
https://askubuntu.com/questions/160945/ ... l-keyboard

The "Lock keyboard for Baby" made me smile.

User avatar
Mike Walsh
Posts: 6351
Joined: Sat 28 Jun 2014, 12:42
Location: King's Lynn, UK.

#6 Post by Mike Walsh »

I had something of the same problem as the OP in foxpup's link. Spilt coffee on the right-hand side of the old Dell's keyboard, a couple of years ago. Some of the keys have recovered, but a few are permanently 'disabled'.

For those that no longer function, I've put together a few wee scripts to operate 'spare' keys on the keyboard in their place.....making use of 'xmodmap' to do so. These I placed in /root/Startup to run 'em at boot time. Thus, I can use the laptop outside during the summer.

At this time of year, when it lives on the end of the living room table, I simply use a wireless keyboard and proper mouse.

Just curious as to why you want to do so..? (I had to laugh at one of the posts further down foxpup's linked page; the guy who wrote a script to let him temporarily disable his keyboard for 5 minutes whenever he wanted, all because he likes to clean his keyboard.....several times a day! Mine are lucky if they get a clean once a month.... :lol:)


Mike. :wink:

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#7 Post by musher0 »

Burn_IT wrote:On a LAPTOP???
Sorry. My head was in the clouds elsewhere...
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

User avatar
MochiMoppel
Posts: 2084
Joined: Wed 26 Jan 2011, 09:06
Location: Japan

#8 Post by MochiMoppel »

foxpup wrote:Google it!
Maybe this:
1. Execute the command xinput list to list your input devices.
2. Locate AT Translated Set 2 keyboard and take note of its id number; this will be used to disable the keyboard. Also, take note of the number at the end, [slave keyboard (#)]; this is the id number of the master, which will be used to re-enable your keyboard.
3. To disable the keyboard, execute the command xinput float <id#>, where <id#> is your keyboard's id number. For example, if the id was 10, then the command would be xinput float 10.
4.To re-enable the keyboard, execute the command xinput reattach <id#> <master#>, where master is that second number we noted down. So if the number was 3, you would do xinput reattach 10 3.
from:
https://askubuntu.com/questions/160945/ ... l-keyboard
:lol: I'm sure Ubuntu users know how to do step 4 without using the keyboard.

My Puppy does not have xinput, but I found a clever and low tech script here that actually works.
It needs some tweaking (e.g. modifier keys are still active)
The files xmodmap.orig and xmodmap.blank could be saved somewhere and then could be simply loaded by the xmodmap command with 2 separate desktop shortcuts,

mini-jaguar
Posts: 597
Joined: Thu 13 Nov 2008, 13:45

#9 Post by mini-jaguar »

What would be the point of a script if I need to type something to get back in?

I mean I could find another keyboard and plug it in, as I could find a mouse if I disable the touchpad via FlSynclient, but this is just complicating it.

How does that lock function on some Puppies work? I've accidentally hit the lock in the upper right a lot of times, but I've never actually used it.

Does it simply lock the computer until you type in the password? Do you set a password the first time, or is it an already set password? Is it easy to wipe all the gibberish that was typed in before you wanted to get the keyboard functionality back?

foxpup
Posts: 1132
Joined: Fri 29 Jul 2016, 21:08

#10 Post by foxpup »

mini-jaguar wrote:What would be the point of a script if I need to type something to get back in?
I thought you still had the mouse to click on an icon with a script to unlock.
There are also other possibilities in the thread. This thread was just the first one I found by googling. I suggest you google yourself.
How does that lock function on some Puppies work?
I just tried it in Bionicpup64. It completely locks your computer until you type the password.
You can set the password the first time you click the icon. You have to repeat the password (of course).
Next times you click the icon you lock up the computer until you type the password.
Simple and easy.

mini-jaguar
Posts: 597
Joined: Thu 13 Nov 2008, 13:45

#11 Post by mini-jaguar »

foxpup wrote:
mini-jaguar wrote:What would be the point of a script if I need to type something to get back in?
I thought you still had the mouse to click on an icon with a script to unlock.
Sounds good to me. Which particular program are you referring to?

I tried the lock. Pretty cool, you can try to get back in and it doesn't stop you after a certain number of attempts, I think I tried over 30 times. You can also hit enter to clear the gibberish that was typed in before.

The only thing I don't like about the lock is that it goes into screen saver and I wanted to keep the desktop on the screen, although the lock will still be useful in emergency situations.

I guess I'll try Lock Keyboard for Baby. I'm having a little trouble finding a .pet with Perl...

foxpup
Posts: 1132
Joined: Fri 29 Jul 2016, 21:08

#12 Post by foxpup »

Which particular program are you referring to?
step 4:

Code: Select all

xinput reattach <id#> <master#>
You can also hit enter to clear the gibberish that was typed in before.
I don't understand what you mean by that.
I'm having a little trouble finding a .pet with Perl.
I think you have to load the devx sfs. Just put it next to the main sfs, load it with load_sfs and next times it will be loaded automatically on boot.

mini-jaguar
Posts: 597
Joined: Thu 13 Nov 2008, 13:45

#13 Post by mini-jaguar »

foxpup wrote:
Which particular program are you referring to?
step 4:

Code: Select all

xinput reattach <id#> <master#>
You can also hit enter to clear the gibberish that was typed in before.
I don't understand what you mean by that.
I'm having a little trouble finding a .pet with Perl.
I think you have to load the devx sfs. Just put it next to the main sfs, load it with load_sfs and next times it will be loaded automatically on boot.
Yeah, that works, it's a clever way to do it, just save that script and click on the icon. In fact you don't even have to do that, if you restart the X server with the keypad, the keyboard function will also be restored after the X server is restarted. Not all Puppies seem to have the xinput command, but many do.

I was talking about clearing.the junk that the baby/slightly older kid/pet typed in.

I still haven't gotten Lock Keyboard for Baby to work, I might be doing it wrong. Do you just click on the icon or do you have to do something else?

foxpup
Posts: 1132
Joined: Fri 29 Jul 2016, 21:08

#14 Post by foxpup »

mini-jaguar wrote:I still haven't gotten Lock Keyboard for Baby to work, I might be doing it wrong. Do you just click on the icon or do you have to do something else?
What icon?

I had not tried lk4b myself, but now I have, in radky's dPup Stretch CE 7.5 - RC4, and it works.
. It needs libgtk2-perl. So you have to install that with dependencies (around 5M) with the PPM.
. I've renamed the perl program file for lock-keyboard-for-baby to "lk4b.pl" for convenience and have placed it in /usr/bin/
. You have to make lk4b.pl executable. Rightclick it and in the properties set the permissions on exec.
. Then you can execute it with the command

Code: Select all

perl /usr/bin/lk4b.pl
There are some options. I have not tried them.

Code: Select all

perl /usr/bin/lk4b.pl --help
One option is the password.
You could also change the password in the file lk4b.pl; open it with the texteditor (geany) to do so.
You can make a .desktop for it if you want, or make a shortcut for it.

Let me know if you get there.

mini-jaguar
Posts: 597
Joined: Thu 13 Nov 2008, 13:45

#15 Post by mini-jaguar »

I'lll get to it eventually, I've been testing the xinput float command and it works great.

The only caveat it that out of the 8 or so Puppies I regularly use only 2 have xinput, and one of the two has an older version of xinput which is missing the float command.

mini-jaguar
Posts: 597
Joined: Thu 13 Nov 2008, 13:45

#16 Post by mini-jaguar »

O.k., I got Lock Keyboard for Baby to work. It also locks the touchpad buttons, so be sure to put on the screen whatever you need to before locking it. The cursor still moves, but you can't click on anything.

Also, the gtk youtube viewer .pets seem to have the necessary dependencies.

foxpup
Posts: 1132
Joined: Fri 29 Jul 2016, 21:08

#17 Post by foxpup »

mini-jaguar wrote:O.k., I got Lock Keyboard for Baby to work. It also locks the touchpad buttons, so be sure to put on the screen whatever you need to before locking it. The cursor still moves, but you can't click on anything.

Also, the gtk youtube viewer .pets seem to have the necessary dependencies.
Don't you get a small grey pop up window - for me it was up left - that says to type the password to unlock?
It does not lock your keyboard.
It intercepts the keystrokes (probably mousclicks and touchpadtouches as well) until you type the password on the keyboard.

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

#18 Post by Marv »

Late to the party but... Here's what I used some time ago to disable the keyboard on my laptop when I had a new kitten. I stripped xinput from the pets for size reasons. The XFCE version gave two .desktops that I added to and stacked in the panel and worked perfectly. The LXDE version gave one .desktop for adding to the panel and toggled. IIRC it pretty much worked. They used xinput 1.61 IIRC and didn't use float, hence the post.
Attachments
LXDE_catcatcher.pet
(15.18 KiB) Downloaded 63 times
XFCE_KBcontrol.pet
(35.92 KiB) Downloaded 66 times
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.

mini-jaguar
Posts: 597
Joined: Thu 13 Nov 2008, 13:45

#19 Post by mini-jaguar »

I'll give those a try sometime, I don't normally use those window managers but they might be useful. I use Saluki/Carolina occasionally but rarely, they have XFCE.

I've found two other problems since then:
1. If something is on part of the touchpad, it's basically useless so I need to plug in a mouse (when using xinput float).
2. None of the solutions block the power button, yes that has happened but I think only once or twice...I don't think there is a solution to this.

User avatar
rufwoof
Posts: 3690
Joined: Mon 24 Feb 2014, 17:47

#20 Post by rufwoof »

Late to the party, saw the post and didn't read back through page 1 until after I'd entered this ... but rather than just deleting it ... using xinput to disable the keyboard for 10 seconds

Code: Select all

#/bin/sh
# xinput list ... and note AT Translated Set 2 Keyboard
# and also note the slave keyboard number near the end of line
# for mine its 6 and 3
xinput float 6  # disable keyboard
sleep 10
xinput reattach 6 3 # re-enable keyboard
[size=75]( ͡° ͜ʖ ͡°) :wq[/size]
[url=http://murga-linux.com/puppy/viewtopic.php?p=1028256#1028256][size=75]Fatdog multi-session usb[/url][/size]
[size=75][url=https://hashbang.sh]echo url|sed -e 's/^/(c/' -e 's/$/ hashbang.sh)/'|sh[/url][/size]

Post Reply