[flexcoders] Re: How to cancel Keyboard events?

2006-05-19 Thread Steven Toth
I'm writing a masked edit control. I want to do various things at various times. I want to allow the deletion of certain characters. I want to allow editing of certain characters. All of which is dependent on the keyboard event/text input, mask, caret index, and selection begin/end index.

Re: [flexcoders] Re: How to cancel Keyboard events?

2006-05-19 Thread Jonathan Miranda
Here's a question for the keyboard cowboys that has stumped me for awhile Internet Explorer grabs the Control-S, Control-P, and Control-O keystrokes (and other commands) and they never even make it to the player. No Keydown event even occurs and this is with focus in the flash player

[flexcoders] Re: How to cancel Keyboard events?

2006-05-19 Thread Steven Toth
That's fine for printable characters (i.e. text), but not for trapping and rejecting special keys like DELETE, BACKSPACE, LEFT, RIGHT, etc. Those keys don't initiate a textInput event. Try it. Thank for the suggestion though. -Steven --- In flexcoders@yahoogroups.com, Manish Jethani

RE: [flexcoders] Re: How to cancel Keyboard events?

2006-05-19 Thread Gordon Smith
Sent: Thursday, May 18, 2006 8:49 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: How to cancel Keyboard events? I'm writing a masked edit control. I want to do various things at various times. I want to allow the deletion of certain characters. I want to allow editing of certain

[flexcoders] Re: How to cancel Keyboard events?

2006-05-18 Thread Steven Toth
Thanks for the feedback, but that does not do the trick. The event is not cancelable, so I cannot prevent the keystrokes. For example, I'm using a TextInput control. I can handle the textInput event and cancel it (not allow the new text to be input) using the prevenDefault() method.

Re: [flexcoders] Re: How to cancel Keyboard events?

2006-05-18 Thread Michael Schmalle
Ah, I got ya. Yeah, I know I read somwhere in the docs about this issue. I can't remeber if it pertains to your particular problem. EDIT - I looked and now REALLY understand you. As far as I know, IE delete, there is no way as of yet. ... But don't take my word for it ;-) I don't think

Re: [flexcoders] Re: How to cancel Keyboard events?

2006-05-18 Thread jeremy lu
write this off top my head, but there are two phases for event, one is capturing phase, the other bubbling phase. I guess what you need to do is like this: Application.application.addEventListener(keyDown, onKeyDown, true); setting third param to true will switch to capture phase, then you

Re: [flexcoders] Re: How to cancel Keyboard events?

2006-05-18 Thread Michael Schmalle
Jeremy, If that works... props to you man! ;-) Peace, MikeOn 5/18/06, jeremy lu [EMAIL PROTECTED] wrote: write this off top my head, but there are two phases for event, one is capturing phase, the other bubbling phase. I guess what you need to do is like this:

[flexcoders] Re: How to cancel Keyboard events?

2006-05-18 Thread Steven Toth
No dice. I do see the eventPhase equal to 1 (capture), but the stopPropagation() and stopImmediatePropagation() still do not prevent the DELETE from being processed. I'm beginning to think I'm just going about this the wrong way. There has to be a way to do this. I'd love to see what's

Re: [flexcoders] Re: How to cancel Keyboard events?

2006-05-18 Thread jeremy lu
well, if DELETE is the only key you want to rule out, why not just do a if...else to detect it ? On 5/19/06, Steven Toth [EMAIL PROTECTED] wrote: No dice.I do see the eventPhase equal to 1 (capture), but thestopPropagation() and stopImmediatePropagation() still do notprevent the DELETE from

RE: [flexcoders] Re: How to cancel Keyboard events?

2006-05-18 Thread Gordon Smith
] On Behalf Of Steven Toth Sent: Thursday, May 18, 2006 5:40 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: How to cancel Keyboard events? No dice. I do see the eventPhase equal to 1 (capture), but the stopPropagation() and stopImmediatePropagation() still do not prevent the DELETE

[flexcoders] Re: How to cancel Keyboard events?

2006-05-18 Thread Steven Toth
text afterwards. - Gordon -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Steven Toth Sent: Thursday, May 18, 2006 5:40 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: How to cancel Keyboard events? No dice. I do see