(the key) not being updated when command is down under OSX

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

  1. #1

    Default (the key) not being updated when command is down under OSX

    Hi All,

    I have a very weired problem occurring under OSX.

    I basically have a keyupscript which look like this

    on gsKeyReleasedByUser

    -- Called when KeyUp

    if ((the key = "z") or (the key = "Z")) and (the commandDown = TRUE) then
    -- put "undo"

    else if ((the key = "x") or (the key = "X")) and (the commandDown = TRUE) then
    -- put "cut"
    else if ((the key = "c") or (the key = "C")) and (the commandDown = TRUE) then
    -- put "copy"
    else if ((the key = "v") or (the key = "V")) and (the commandDown = TRUE) then
    -- put "paste"
    else
    nothing
    pass
    end if


    end

    The weird problem i have is when I press just "X" (without command) then I press Command+ "V" the lingo for Command + "X" gets executed hence "cut" gets executed instead of "paste"


    This happens only at times......I investigated when this occurred.

    I have a Edit menu in my application which has these cut, paste, undo and xopy commands. ... These commands are displayed along with their keyboard shortcuts. When i disable the menu items, it works fine...when the menu item is enabled, the above problem is observed.

    Please let me know if there is a bug in OSX or director MX?

    Thanks

    Pavan


    WrongPillNeo webforumsuser@macromedia.com Guest

  2. Similar Questions and Discussions

    1. Acrobat 6.01: File Command disappears on Command Bar
      On the Command Bar (File, Edit, View, etc.) the File Command disappears in many Acrobat operations. Is there a parameter available to insure that...
    2. Datagrid not updated during delete, but updated during insert and update
      Hello everyone. A test webform here, single datagrid bound to one table through dataset, and controls to delete, update and insert data. The code...
    3. Windows Explorer Right Click Command (+ Custom Command Script)
      Ok got a tricky question about custom scripts, I would like to add a Windows Explorer Right Click Command - that allows me to select an image/s...
    4. Multi command files and running them from the command prompt
      Use the -td§ option . Details are in the section titled Command Line Processor Options in the Command Reference. "Derek Clarkson"...
    5. Imported + updated symbols don't stay updated
      Hi everybody. I apologize for posting a question that probably any newbie should know, but ... I'm a rank Fireworks newbie. My problem is that the...
  3. #2

    Default Re: (the key) not being updated when command is down under OSX

    Hi Pavan,

    First, this won't work in the Authoring mode, you have to test it in a
    projector or SW.

    Second, it may be the way that you've written the code.

    Try this instead:

    add a text or field member to hold the result.

    on gsKeyReleasedByUser
    if the commandDown then
    case the keyCode of
    7: member("your member name").text = "cut" -- the x key
    8: member("your member name").text = "copy" -- the c key
    9: member("your member name").text = "paste" -- the v key
    end case
    end if
    end

    Keycodes will let you capture either the upper or lower case key press.
    you also want to test for the key down event, not the key up event.

    --
    Rob
    _______
    Rob Dillon
    Team Macromedia
    [url]http://www.ddg-designs.com[/url]
    412-243-9119

    [url]http://www.macromedia.com/software/trial/[/url]
    Rob Dillon Guest

  4. #3

    Default Re: (the key) not being updated when command is down under OSX

    Hi Rob,

    I did a bit more playing around. There is definitely a conflict of somesort between the menu items "Cut" , "copy" and "Paste"

    As soon as i remove the /X, /C and /V from the menu string so that there is not command key equivalent, the code starts to work like a charm.

    If i remove the lingo from the keydownscript and i put the command key equivalent (/X , /V and /C) back into the menu item, it does not work i.e pressing command + c x or v do not execute the lingo from the menu.

    Note that this is only the case on OSX.

    Pavan


    WrongPillNeo webforumsuser@macromedia.com Guest

  5. #4

    Default Re: (the key) not being updated when command is down under OSX

    Do you have something else running in the background? I tested the code
    that I sent on OS 10.3 and it worked fine here.

    --
    Rob
    _______
    Rob Dillon
    Team Macromedia
    [url]http://www.ddg-designs.com[/url]
    412-243-9119

    [url]http://www.macromedia.com/software/trial/[/url]
    Rob Dillon 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