How to lock and unlock keyboard in Ubuntu ?

18,321

xtrlock might be what you're looking for. It disables the keyboard until you type your password. It does also disable the mouse, but you might be able to change that in the config. Install it by running sudo apt-get install xtrlock.

Share:
18,321

Related videos on Youtube

Shohanur Rahaman
Author by

Shohanur Rahaman

Updated on September 18, 2022

Comments

  • Shohanur Rahaman
    Shohanur Rahaman over 1 year

    I want to lock my desktop keyboard is there any command or shortcut to do this ?

    • TheWanderer
      TheWanderer almost 9 years
      You mean so it doesn't input anything? sudo apt-get install xtrlock might be what you need. ubuntuforums.org/showthread.php?t=993800
    • Shohanur Rahaman
      Shohanur Rahaman almost 9 years
      yes it doest not input anything.
    • TheWanderer
      TheWanderer almost 9 years
      Did that program work?
    • Shohanur Rahaman
      Shohanur Rahaman almost 9 years
      This is stupid program, it locks my keyboard,cursor and I cant unlock those.
    • Shohanur Rahaman
      Shohanur Rahaman almost 9 years
      where I type my password ? I didn't found any password typing field when I locked keyboard.
    • TheWanderer
      TheWanderer almost 9 years
      Just type it. It's automatically listening
    • Shohanur Rahaman
      Shohanur Rahaman almost 9 years
      it works but It lock both keyboard and mouse. Is there any way to lock only keyboard not cursor so that I can scroll and click ?
    • TheWanderer
      TheWanderer almost 9 years
      I'm not sure. You can look in the config files (probably somewhere under ~/.config).
    • TheWanderer
      TheWanderer almost 9 years
      Is it answer worthy?
    • Kaz Wolfe
      Kaz Wolfe almost 9 years
      @Zacharee1 If it solved the problem and you can explain how, then yes.
    • Parto
      Parto almost 9 years
      @Zacharee1 please type it below as an answer and I will give you a +1
    • Ron
      Ron almost 9 years
      possible duplicate of How to disable and enable keyboard in ubuntu? Read it if you want to disable only keyboard.
    • TheWanderer
      TheWanderer almost 9 years
      @Ron the problem with that is the keyboard is completely disabled for a certain amount of time. It's not a switch
  • Shohanur Rahaman
    Shohanur Rahaman almost 9 years
    how can I config this ?
  • TheWanderer
    TheWanderer almost 9 years
    I'm going to install it and check it out
  • TheWanderer
    TheWanderer almost 9 years
    It doesn't look like there's something that'll lock only the keyboard. You can make two scripts, one to disable the keyboard and one to enable it, but you'd have to make desktop files to run those scripts. It would be a hassle to do this. I could help though. I won't be here for about 2 hours though.