How would I go about detecting keystrokes on the keyboard?
rysin 0 Light Poster
Recommended Answers
Jump to PostYou can use the Tkinter GUI toolkit too:
# KeyLogger.py # show a character key when pressed without using Enter key # hide the Tkinter GUI window, only console shows import Tkinter as tk def key(event): if event.keysym == 'Escape': root.destroy() print event.char root = tk.Tk() print …
Jump to PostHowever, pyHook and pythoncom work only on Windows systems. Not too bad, since most computers in this world are using Windows. Tkinter is more cross-platform for the few odd folks that user other OS.
All 7 Replies
rysin 0 Light Poster
sneekula 969 Nearly a Posting Maven
rysin 0 Light Poster
Tech B 48 Posting Whiz in Training
bumsfeld 413 Nearly a Posting Virtuoso
Szepi 0 Newbie Poster
TrustyTony 888 ex-Moderator Team Colleague Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.