just Alt
-Oorspronkelijk bericht-
Van: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] Namens Henrik Andersson
Verzonden: dinsdag 16 november 2010 14:54
Aan: Flash Coders List
Onderwerp: Re: [Flashcoders] How to detect for modifier (alt/ctrl
...@chattyfig.figleaf.com] Namens Glen Pike
Verzonden: dinsdag 16 november 2010 1:08
Aan: Flash Coders List
Onderwerp: Re: [Flashcoders] How to detect for modifier (alt/ctrl) keys
Yes, but if you don't use keyEvent.ctrlKey in your event handler, but
check for CTRL and set a flag:
e.g.
public static const
I am curious, does the key say Alt or AltGr? They are not quite the
same.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
The work-around I listed would of course only work if you are just
interested in key combo's with either Alt or Ctrl.
Something like (right) Alt-Ctrl-5 won't work.
I had a second thought on Henriks comment about Alt vs AltGr and Googled a
bit.
Part of Wiki article:
Control + Alt
In an application I am building I need to detect whether the (right) alt-key
was pressed in combination with another (letter) and make sure that the
control key isn't being pressed at the same time.
But it looks like the Keyboard events for both MOUSE_DOWN and MOUSE_UP
always return true for
Hi,
I would suggest using a keyboard manager class that tracks when
various keys are pressed and sets a flag - this would effectively allow
you to Poll such keys when you are checking others.
There is a good example from Richard Lord here:
Thanks for the tip Glen.
Unfortunately that class also shows the problem of Keyboard.CONTROL (keycode
17) being reported as being down (while it actual isn't) when the right alt
key is being pressed.
- Benny
___
Flashcoders mailing list
Just thinking out loud, but I took a look at the code and I am wondering
if this would this not be better implemented as a singleton?
On 11/15/2010 6:01 PM, Glen Pike wrote:
Hi,
I would suggest using a keyboard manager class that tracks when
various keys are pressed and sets a flag - this
Yes, but if you don't use keyEvent.ctrlKey in your event handler, but
check for CTRL and set a flag:
e.g.
public static const CTRL_KEYCODE:int = 17;
private var _ctrlKeyDown:Boolean = false;
//etc
function onKeyDownHandler(e:KeyboardEvent):void
{
switch(e.keyCode) {
9 matches
Mail list logo