Detecting keyboard input

Ask a Question related to Macromedia Director Lingo, Design and Development.

  1. #1

    Default Detecting keyboard input

    Problem overview.

    An item of hardware has been built that contains a number of keys.
    Pressing these keys produces an event that is the same as a keyboard event.
    For example pressing hardware key 1 produces a ?,? (comma) and hardware key 2 produces a ?.? (period) etc.

    This can be shown to work by running the hardware connected to notepad and notepad shows the correct/expected results.

    I was given the keyboard-mapping list and asked to develop interactions using Macromedia Director that would respond to certain keyboard presses.

    This Director exe runs perfectly when driven from the computer keyboard and meets with the requirements.

    However when the hardware is connected to the pc the Director exe only sees the hardware key presses intermittently.

    So although both deliverables work to specification i.e. the hardware produces the correct values when connected to notepad. And the software reacts correctly to the appropriate keyboard inputs; the two do not work together.

    Any insights?

    thanks

    ron bird



    budgiebird webforumsuser@macromedia.com Guest

  2. Similar Questions and Discussions

    1. date input from keyboard and from datechooser
      Hi I have an application and I'd like to give the users the posibility to enter a date from keyboard, and also to be able to pick one from a...
    2. Keyboard Input Non-Functional
      When I attempt to play any flash game on any given website I get no feedback from the game. Mouse movements and clicks do, however, work. I'm...
    3. Keyboard input
      Is there away to navigation html pages with arrows instead of mouseclicks. My client does not want the usual NEXT and BACK buttons on the screen....
    4. Perl Newbie question: How would you take keyboard input and run a shell scrip with that input?
      I don't think you could be vaguer :) Very basic #!/usr/bin/perl # update.pl multiple options command line my @packages = @ARGV foreach...
    5. Flash and japanese keyboard input problem (OS 9.0)
      Does anyone have experience of the following? I have Japanese language installed and when using Flash MX the OS keeps going into Japanese...
  3. #2

    Default Re: Detecting keyboard input

    In Dir, are you using keyCode or ascii values? I'd start with ascii vals


    "budgiebird" <webforumsuser@macromedia.com> wrote in message
    news:bnja0v$mf5$1@forums.macromedia.com...
    > Problem overview.
    >
    > An item of hardware has been built that contains a number of keys.
    > Pressing these keys produces an event that is the same as a keyboard
    event.
    > For example pressing hardware key 1 produces a ?,? (comma) and hardware
    key 2 produces a ?.? (period) etc.
    >
    > This can be shown to work by running the hardware connected to notepad and
    notepad shows the correct/expected results.
    >
    > I was given the keyboard-mapping list and asked to develop interactions
    using Macromedia Director that would respond to certain keyboard presses.
    >
    > This Director exe runs perfectly when driven from the computer keyboard
    and meets with the requirements.
    >
    > However when the hardware is connected to the pc the Director exe only
    sees the hardware key presses intermittently.
    >
    > So although both deliverables work to specification i.e. the hardware
    produces the correct values when connected to notepad. And the software
    reacts correctly to the appropriate keyboard inputs; the two do not work
    together.
    >
    > Any insights?
    >
    > thanks
    >
    > ron bird
    >
    >

    Alexander Ross Guest

  4. #3

    Default Re:Detecting keyboard input

    what handler are you using.

    sometimes the keypresses may work intermitently due tio one handler canceling out another

    try using both the on keydown and key up handlers

    eg

    on keydown me
    if keypressed(123) then blah
    if keypressed(124) then hblah
    if keypressed(125) then hhblah
    end if

    on keyup me
    if keypressed(123) then blah
    if keypressed(124) then hblah
    if keypressed(125) then hhblah
    end if

    hth


    HAIRYBOBBY - why didn't I choose a really cool name like the vulcanpimp

    [url]http://www.geocities.com/hairybobby2000[/url]

    new vector shape behaviors here

    [url]http://www.geocities.com/hairybobby2000/vertexhome.html[/url]
    hairybobby webforumsuser@macromedia.com Guest

  5. #4

    Default Re:Detecting keyboard input

    Hi guys
    the handler I'm using is for example:

    if the keypressed = numtochar(50) then

    thanks for the feedback, I'll look to investigating your proposals shortly.

    Cheers

    ron



    budgiebird webforumsuser@macromedia.com Guest

  6. #5

    Default Re:Detecting keyboard input

    Thanks guys and thanks 'hairybobby'......it worked, we can all sleep well now!!



    budgiebird webforumsuser@macromedia.com Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139