Welcome to Dream.In.Code
Getting Help is Easy!

Join 86,399 Programmers. There are 1,447 online right now! Ask your question and get quick answers from Dream.In.Code experts. Join the #1 programming help community on the internet! Registration is fast and FREE... Join Now!

Chat LIVE With a Expert
Powered by LivePerson.com

Register to Make This Box Go Away!

Detect whe a key is released with python

 
Reply to this topicStart new topic

Detect whe a key is released with python

Xiph
post 23 Apr, 2008 - 03:03 AM
Post #1


New D.I.C Head

*
Joined: 9 Nov, 2006
Posts: 8



I've been searching on google the whole morning trying to figure out how to make python detect when I release a specific key on the keyboard.

I now use getch() to detect when a key is pressed, but I also want to know when it's released.

Anyone know how to solve this?
User is offlineProfile CardPM
Go to the top of the page
+Quote Post


Nova Dragoon
post 23 Apr, 2008 - 11:01 AM
Post #2


The Innocent Shall Suffer, Big Time

Group Icon
Joined: 16 Aug, 2001
Posts: 5,754

you may want to look into a library that are made to handle such things, such as pyGame.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

Xiph
post 23 Apr, 2008 - 05:28 PM
Post #3


New D.I.C Head

*
Joined: 9 Nov, 2006
Posts: 8

QUOTE(Nova Dragoon @ 23 Apr, 2008 - 11:01 AM) *

you may want to look into a library that are made to handle such things, such as pyGame.

Unfortunately I can't do that because I get: "No module named locals" when I try to import pygame.locals. Seems to be a bug. Well seems that I have to try a diffrent language.
Python really sucks imo :-/
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 5/17/08 06:10AM

Live Help!

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

Bye Bye Ads

Free DIC T-Shirt

T-Shirt Example

Related Sites

Monthly Drawing

Thumb Drive

Partners

Top Contributors

Top 10 Kudos This Month