Python Forum
keyboard module; must be root problem
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
keyboard module; must be root problem
#2
(Apr-02-2021, 09:56 PM)philipbergwerf Wrote: How to use keyboard without being root/sudo?

For this particular module, you cannot. This is listed as a limitation in the docs:

Quote:To avoid depending on X, the Linux parts reads raw device files (/dev/input/input*) but this requires root.

The function itself seems okay (but you should probably profile it to see what the performance is). I'd be more concerned that the check was being run when it wasn't necessary. Maybe add some logging and make sure it's only being called on button presses and not other times.
philipbergwerf likes this post
Reply


Messages In This Thread
RE: keyboard module; must be root problem - by bowlofred - Apr-02-2021, 10:44 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  problem with memory_graph module akbarza 3 436 Mar-04-2024, 10:15 AM
Last Post: snippsat
  problem using coloeama module akbarza 3 629 Jan-08-2024, 07:31 AM
Last Post: akbarza
  problem in using subprocess module akbarza 5 1,106 Sep-24-2023, 02:02 PM
Last Post: snippsat
  problem in import module from other folder akbarza 5 1,583 Sep-01-2023, 07:48 AM
Last Post: Gribouillis
  problem in using pyqrcode module to create QRcode akbarza 9 2,173 Aug-23-2023, 04:17 PM
Last Post: snippsat
  Problem with Pyinstaller. No module named '_tkinter' tonynapoli2309 0 1,069 May-15-2023, 02:38 PM
Last Post: tonynapoli2309
  Problem with module time and leap seconds Pedroski55 3 1,291 Oct-07-2022, 11:27 PM
Last Post: Pedroski55
  keyboard module question DPaul 0 2,172 Mar-23-2021, 04:22 PM
Last Post: DPaul
  keyboard module doesn't work in the microsoft version terminal of python. username 1 2,867 Feb-25-2021, 05:19 PM
Last Post: Larz60+
  Problem with Flask Bcrypt import module marcello86 2 5,837 Aug-31-2020, 08:10 PM
Last Post: marcello86

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020