6

I want my whole keyboard disabled for some time as I keep my notebook on my laptop keyboard while studying and unnecessarily, many unwanted keys are pressed. But, I don't want to disable the touchpad as I need any one input device.

I have installed ParrotOS (Debian Based).

Please suggest

3
  • 1
    This might be helpful to you: askubuntu.com/questions/160945/…. May 6, 2019 at 19:04
  • 1
    Thank you... That was everything.. If instead of comment, you would have answered, you'd have got my upvote... Although I had to install xinput
    – DeshBhakt
    May 6, 2019 at 19:25
  • No problem. Yeah, I wasn't sure if it would work for you. I can put together an answer when I get to my computer, so that people can find it better. May 6, 2019 at 19:56

1 Answer 1

8

You can use xinput float to disable your keyboard.

As @Ignacio Vazquez-Abrams answered in https://askubuntu.com/a/178741/905329:

You can use xinput to float the input device under X.

  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.
2
  • 1
    I made two bash files, one for disabling the keyboard and one for enabling so that I don't have to connect a keyboard everytime I want to re-enable it...
    – DeshBhakt
    May 9, 2019 at 10:37
  • Sounds useful. Good thinking! May 9, 2019 at 11:30

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .