0

I want to do when "key is pressed" In pycharm but I cant import keyboard. I tryed to look on youtube but for them it work but when I try to import keyboard it doesn't exist. I opened cmd and typed pip instal keyboard and it dawnloaded it and nothing. Any ideas

HIpex
  • 75
  • 5

1 Answers1

1

You need to install keyboard package using pip package manager from pycharm terminal.

pip3 install keyboard

Then create inside .py file simply import.

import keyboard

The terminal should below the Pycharm GUI just like shown in the image. enter image description here

rafathasan
  • 524
  • 3
  • 15
  • Where do I tipe that pip3 instal keyboard? – HIpex Oct 18 '22 at 08:10
  • 1
    I have add a screenshot please try to follow it. – rafathasan Oct 18 '22 at 08:39
  • Thank you it works i tryed and I needed to upgarde pip than I tryed to update it on python and then when I tryed on cmd as administrator I did something wrong is it said that I need to use other command so I copied it and enter and now it works. – HIpex Oct 18 '22 at 11:10
  • If you think this answered your question then feel free to upvote and accept it as answer. So that other people can see it. Thanks! – rafathasan Oct 18 '22 at 11:53