You Are Here:

Community: Developer Discussion Boards

#1 Old Catching key events of a Text type - 2006-03-27, 13:56

Join Date: Oct 2004
Posts: 158
bercobeute
Offline
Regular Contributor
Catching key events of a Canvas is described in the documents, but is it also possible to catch key events of a Text type?
Reply With Quote

#2 Old Re: Catching key events of a Text type - 2006-03-30, 11:21

Join Date: Oct 2004
Posts: 158
bercobeute
Offline
Regular Contributor
is this impossible?
Reply With Quote

#3 Old Re: Catching key events of a Text type - 2006-03-30, 12:34

Join Date: Oct 2004
Posts: 158
bercobeute
Offline
Regular Contributor
I just found:
Code:
Text.bind(event_code, callback)
The problem is that this only allows for binding one event_code (keypress) to the callback object. How can I bind multiple (or all) event_codes to the callable object? Is there maybe one keycode for all keys?
Reply With Quote

#4 Old Re: Catching key events of a Text type - 2006-03-30, 13:19

Join Date: Nov 2005
Posts: 12
lhuovine
Offline
Registered User
You can call bind() several times with different event codes and callback functions.
Reply With Quote

#5 Old Re: Catching key events of a Text type - 2006-03-30, 13:36

Join Date: Oct 2004
Posts: 158
bercobeute
Offline
Regular Contributor
Quote:
Originally Posted by lhuovine
You can call bind() several times with different event codes and callback functions.
I tried that (see code below), but in that case only the last bind works:

Code:
keyCodesList =[key_codes.EKey0, key_codes.EKey1]
for keyCode in keyCodesList:
    titleTextComponent.bind(keyCode, callBackObj)
Reply With Quote

#6 Old Re: Catching key events of a Text type - 2006-04-02, 23:57

Join Date: Oct 2004
Posts: 158
bercobeute
Offline
Regular Contributor
I now see that the code below listens to numbers being typed in. I just want to know whether the key was pressed (whether in number mode or in text mode). I tried 'key_codes.EScancode0' instead of 'key_codes.EKey0'. No success. Any suggestions?


Quote:
Originally Posted by bercobeute
I tried that (see code below), but in that case only the last bind works:

Code:
keyCodesList =[key_codes.EKey0, key_codes.EKey1]
for keyCode in keyCodesList:
    titleTextComponent.bind(keyCode, callBackObj)
Reply With Quote

#7 Old Re: Catching key events of a Text type - 2006-04-08, 00:28

Join Date: Apr 2006
Posts: 3
kaiss7981
Offline
Registered User
I'm trying to do the same thing with no luck... it seems text.bind() could work but I can't find scan codes for characters that work for the text widget. Is this possible?
Reply With Quote

#8 Old Re: Catching key events of a Text type - 2006-04-12, 10:31

Join Date: Oct 2004
Posts: 158
bercobeute
Offline
Regular Contributor
I added a feature request for the next version of pys60: being able to call Text.bind() several times with different event codes and the same callback function.
Reply With Quote

#9 Old Re: Catching key events of a Text type - 2006-04-21, 18:34

Join Date: Apr 2006
Posts: 3
kaiss7981
Offline
Registered User
Another thought... is there someway to trap a keypress event at the OS level and access that from python?
Reply With Quote
Reply « Previous Thread | Next Thread »
Display Modes
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules

You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump
Similar Threads
Thread Thread Starter Forum Replies Last Post
Persist text value of user defined option in Enumerated Text Settings List leethomso Symbian User Interface 0 2004-11-24 19:49
3410 losing key events marcpalmer Mobile Java General 4 2003-09-30 23:50
D211 with RH7.3 fiveam Multimodecards 3 2003-02-24 10:06
D211 : Compiling the user interface for Linux...? franz_meyer Multimodecards 1 2002-12-09 12:48
Problem with Nokia D211 Linux Drivers fiveam Multimodecards 1 1970-01-01 02:00

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia 
RDF Facets: qdcZidentifierQSxhttpE3aE2fE2fdiscussionE2eforumE2enokiaE2ecomhttpE3aE2fE2fdiscussionE2eforumE2enokiaE2ecomE2fforumE2fshowthreadE2ephpE3ftE3d81449X qdcZtypeQUqfnZE45E78cludedFromGeneralE4cistingsQ qdcZtypeQUqfntypeZCommunityContentQ qdcZtypeQUqfntypeZE44iscussionQ qdcZtypeQUqfntypeZE44iscussionContentQ qdcZtypeQUqfntypeZE52esourceQ qdcZtypeQUqfntypeZWebpageQ qdcZtypeQUqmarsZManagedE52esourceQ qdcZtypeQUqwebZInformationE52esourceQ qdcZtypeQUqwebZPageQ qdcZtypeQUqwebZE52esourceQ qdcZtypeQUqrdfsZE52esourceQ qfnZtopicQUqfnTopicZpythonQ qfnZtypeQUqfntypeZCommunityContentQ qfnZtypeQUqfntypeZE44iscussionQ qfnZtypeQUqfntypeZE44iscussionContentQ qfnZtypeQUqfntypeZE52esourceQ qfnZtypeQUqfntypeZWebpageQ qfnZuserE5ftagQSxpythonX qmarsZlanguageQUxhttpE3aE2fE2fswE2enokiaE2ecomE2flanguageE2d1E2fenX qrdfZtypeQUqfnZE45E78cludedFromGeneralE4cistingsQ qrdfZtypeQUqfntypeZCommunityContentQ qrdfZtypeQUqfntypeZE44iscussionQ qrdfZtypeQUqfntypeZE44iscussionContentQ qrdfZtypeQUqfntypeZE52esourceQ qrdfZtypeQUqfntypeZWebpageQ qrdfZtypeQUqmarsZManagedE52esourceQ qrdfZtypeQUqwebZInformationE52esourceQ qrdfZtypeQUqwebZPageQ qrdfZtypeQUqwebZE52esourceQ qrdfZtypeQUqrdfsZE52esourceQ