dcsimg
A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: Keyboard Listener oddity - any ideas?

  1. #1
    His Flashy Highness
    Join Date
    Aug 2001
    Location
    SF Bay area
    Posts
    56
    Hi folks, I'm trying to catch "delete" keys and I use a key listener for that. Only... it seems that some keys, including delete just don't trigger that listener. Did I do anything wrong? Any ideas?

    When I use this I see "key" for every normal character I press, but I never see "del" and -- more than that -- I don't even see "key" when I press the Delete key. It seems delete doesn't send the key event for whatever reason (neither does backspace, etc.)

    <pre>

    KeyListener = new Object();
    KeyListener.onKeyDown = keyHandler;
    Key.addListener(KeyListener);

    function keyHandler() {
    trace("key!");
    if (Key.isDown(Key.DELETEKEY)) {
    trace("del");
    }
    }

    </pre>

    Ideas? thoughts? Advice?

    Juggle5

  2. #2
    www.intensewd.com
    Join Date
    Apr 2002
    Location
    Australia
    Posts
    450
    i'm just guessing but i imagine there would be "special" keys that just aren't available like that. maybe you could make a "delete" button or something instead?

    Cheers,
    Ben

  3. #3
    Senior Member chi-styler's Avatar
    Join Date
    Jul 2001
    Location
    Bristol, UK
    Posts
    1,237
    Don't know whether this is any help to your situation:

    http://board.flashkit.com/board/show...hreadid=154958

  4. #4
    Senior Member
    Join Date
    Jan 2002
    Posts
    368
    also check out colin moock's ASDG. he has a section on trapping keys and some of the idiosyncracies involved with various browsers, players, projectors.

Posting Permissions

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




Click Here to Expand Forum to Full Width

HTML5 Development Center