[SOLVED] disable keyboard temporarily so that a book on keyboard does nothing.
Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
disable keyboard temporarily so that a book on keyboard does nothing.
i sometime need to place a book on keyboard but then i also dont want it to press key randomly. so i am looking for a way to,
temporarily disable a keyboard except for few keys like up/down for scrolling and another 'control key' for enabling/disabling.
Distribution: Cinnamon Mint 20.1 (Laptop) and 20.2 (Desktop)
Posts: 1,673
Rep:
Humour me... Why do you need to put a book on the keyboard?
Have you tried putting the keyboard on your knees, book on the table/desk?
Putting your keyboard/system on a bigger table/desk which will also accomodate the book?
Put the book on the table/desk and the keyboard standing vertically to the left ot right of the table/desk?
Getting a separate bookstand (like a music stand)?
Then there's...
Get a pdf file of the book and display it on your left or right hand screen? Huh? You don't have two screens?
Nail the book to the wall behind your screen... (sorry becomming silly now so I'll stop.
Then again...maybe unplug the keyboard and fit a USB number keypad(much smaller)? You'd get home, pg up, arrow keys,etc.
s/book/cat/ and you would have my reason for wanting to disable the keyboard occasionally. (Of course, I'm not the one "placing" the cat on the keyboard.)
i have a laptop which is either or my lap or a small desk. so cant do anything suggested.
Quote:
Out of curiosity, is this just a hypothetical question to see if it can be done, or is it for a reason?
i know its bit silly, but imagine you reading from a pdf in laptop which has two usb connections and one power, now you want to take notes and moving this whole setup seems trickier than disabling the keyboard temporarily and then keyboard (of laptop) can work as support pad too. before any one say, cant close the lid either.
i am still digging though but i think an almost-null keymap with only few assigned keys (control key at least) would work. can double keystroke be assigned as a global shortcut system wide (independent of X) ?
Distribution: Cinnamon Mint 20.1 (Laptop) and 20.2 (Desktop)
Posts: 1,673
Rep:
Quote:
i have a laptop which is either or my lap or a small desk.
Aha! This is a vital piece of information which you didn't supply when you originally posted the question!
The solution is therefore much clearer!
Quote:
i know its bit silly, but imagine you reading from a pdf in laptop which has two usb connections and one power, now you want to take notes and moving this whole setup...
Wrong! You don't move the laptop, you move the notes!
If the notes you are taking are on loose paper (or will be fitted into a loose leaf binder) Buy a clip board and. with the laptop on the table, hold the clip board in one hand while writing notes with the other. The clip board can be laid on your lap/the floor or wherever while you use the laptop.
Use a hard backed notebook if loose leaf is not an option.
I would use xlock or xlockmore to lock the screen, that way you need to put in a password and that's unlikely to be entered with a book. It's not 100%, but the only 100% solution is to unplug the keyboard or stop putting a book on the keyboard.
would temp*ly disable the keyboard. the only keys that would work is Super_L, Esc, Up, Down, Left, Right, Alt_L, Tab . so even in disable mode i would still be able to switch between windows (hence the books) and scroll . keyboard can be revert back to normal mode by assigning an executable file (here change_xmodmap.sh) to a key combination (here Super_L + Esc).
change_xmodmap.sh
Code:
#!/bin/bash
file=~/.IsXmodmapNull
if [ -e $file ] ; then
xmodmap ~/.Xmodmap
rm $file
notify-send "book-xmodmap disabled"
else
xmodmap ~/.Xmodmap_null
touch $file
notify-send "book-xmodmap enabled"
fi
i was wondering if double keystroke like tap can be used as key combination ?
Quote:
Originally Posted by Soadyheid
If the notes you are taking are on loose paper (or will be fitted into a loose leaf binder) Buy a clip board and. with the laptop on the table, hold the clip board in one hand while writing notes with the other. The clip board can be laid on your lap/the floor or wherever while you use the laptop.
Use a hard backed notebook if loose leaf is not an option.
you really want to solve the problem from another angle.
Quote:
Originally Posted by H_TeXMeX_H
I would use xlock or xlockmore to lock the screen, that way you need to put in a password and that's unlikely to be entered with a book. It's not 100%, but the only 100% solution is to unplug the keyboard or stop putting a book on the keyboard.
i cant. i still want to read book and scroll through pages.
i was wondering if double keystroke like tap can be used as key combination ?
Use a key combination that is very unlikely to be pressed by a book, like Ctrl+Alt+F12.
May be a dumb question, but if you want to make notes, why don't you just launch your favorite text editor and use the keyboard instead of disabling it? I for one can type faster that write with the hand and if your WM or DE has a scratchpad function (may be named different in other WMs/DEs as i3) it is very easy to show the editor only when needed (on any screen).
Use a key combination that is very unlikely to be pressed by a book, like Ctrl+Alt+F12.
faster stroke is also very unlikely to be replicated by book and also its also very quick for me .
Quote:
Originally Posted by TobiSGD
May be a dumb question, but if you want to make notes, why don't you just launch your favorite text editor and use the keyboard instead of disabling it? I for one can type faster that write with the hand and if your WM or DE has a scratchpad function (may be named different in other WMs/DEs as i3) it is very easy to show the editor only when needed (on any screen).
not only i like the complexity that paper-pen provides but also i am math student . i did try to take notes in lyx for a while, but i did not like it very much. however for anything programming related i am most likely to use vim.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.