| Reply | « Previous Thread | Next Thread » |
|
Catching key events of a Canvas is described in the documents, but is it also possible to catch key events of a Text type?
|
| bercobeute |
| View Public Profile |
| Find all posts by bercobeute |
|
is this impossible?
|
| bercobeute |
| View Public Profile |
| Find all posts by bercobeute |
|
I just found:
Code:
Text.bind(event_code, callback) |
| bercobeute |
| View Public Profile |
| Find all posts by bercobeute |
|
You can call bind() several times with different event codes and callback functions.
|
|
Quote:
Code:
keyCodesList =[key_codes.EKey0, key_codes.EKey1]
for keyCode in keyCodesList:
titleTextComponent.bind(keyCode, callBackObj)
|
| bercobeute |
| View Public Profile |
| Find all posts by bercobeute |
|
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:
|
| bercobeute |
| View Public Profile |
| Find all posts by bercobeute |
|
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?
|
|
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.
|
| bercobeute |
| View Public Profile |
| Find all posts by bercobeute |
|
Another thought... is there someway to trap a keypress event at the OS level and access that from python?
|
| Reply | « Previous Thread | Next Thread » |
| Thread Tools | Search this Thread |
|---|---|
| Rate This Thread | |
| 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 |