Multi Key Listeners??

In a nutshell, I've got a zoom tool (magnifying glass cursor)
that toggles between the plus/minus when the user presses CONTROL.
I have also created a class file with my magnifying functions in it
- it shrinks the target when the user is holding down the CONTROL
key. Both listeners work when activated individually, but not at
the same time.
Does anyone know how I can make these two listeners work
together, short of packaging the cursor with the class?
thanks to anyone with input.
Jim

I tried using various keys and key combinations, the latest
being control + N. Here is the list of Flash Shortcuts that I could
find:
Press this To do this
CTRL+O Open a file
SHIFT+CTRL+O Open from web
SPACEBAR Play or pause an open animation
PERIOD Stop the playback
CTRL+LEFT ARROW, NUMPAD 4 Previous movie
CTRL+RIGHT ARROW, NUMPAD 6 Next movie
LEFT ARROW Rewind 20 frames
RIGHT ARROW Forward 20 frames
ALT+LEFT ARROW Rewind 1 frame
ALT+RIGHT ARROW Forward 1 frame
ALT+ENTER, F11 Enter/exit fullscreen mode
ESC (Fullscreen mode) Return from Fullscreen mode
ALT (Fullscreen mode) Show/hide the seek bar and controls
ALT+E Show/hide the Playlist Editor window
ALT+G Toggle Game Mode
ALT+S Take a snapshot
CTRL+UP ARROW Volume Up
CTRL+DOWN ARROW Volume Down
CTRL+M Mute

Similar Messages

  • Multi-key dimension handling in OTBI report design - How?

    In OTBI reporting (i.e. from transactional DB) design , how to handle multi-key dimensions? I don't have option to have a staging/DW area where I can generate surrogate key for dimensions & use it in facts. Currently we are thinking creating Views on top of transactional tables and use it as dimensions & facts. What is the best way to tackle?

    In OTBI reporting (i.e. from transactional DB) design , how to handle multi-key dimensions? I don't have option to have a staging/DW area where I can generate surrogate key for dimensions & use it in facts. Currently we are thinking creating Views on top of transactional tables and use it as dimensions & facts. What is the best way to tackle?

  • Key listeners without a component?

    Hey guys,
    So I have an application with several sliders, buttons, etc. and I would like to set shortcuts for certain parts of it. For example, when the user presses the "n" key, one of the sliders should increase in value. I have looked into this, and found that key listeners only work on a component that has the keyboard focus. Does this mean I should give my main JPanel the keyboard focus and make the shortcuts change the sliders in that listener? What happens if the focus changes from the main panel to one of the buttons and the key is then pressed, will it still call the key listener on the JPanel?
    The best way would be if there was a listener that just listens to the keyboard and is called when a key is pressed, without any need for a specific component. Does anyone know of a way to do this? Thanks beforehand!
    Cheers,
    Lukas

    Young_one wrote:
    Well, the problem is I have 3 applets running on the same page, and so, they don't all have focus at the same time, but the key bindings need to work at any time, no matter which applet the user last clicked in. So I guess the question is if there is a way to create a listener that is not attached to a specific components focus. I would think that a listener that just listens to the keyboard doesn't have to specify a focus, but I guess it does? Thanks for all your help so far.Ah, I'm not an applet expert, but as far as I know, key binding and key listeners require that the app doing the listening have focus: with key listeners the component itself has to have focus, but with key binding, the component that is assigned the binding doesn't have to have focus, but at the very least the window that holds it does. I know of no way around this through standard Java.

  • Multi-Keys for Maps

    Is there a recommended way of storing values that depend on two keys? I need to get a value associated with (not calculated from) two parameters. For a simple example, I have a matrix of values like so:
    \| A | B | C | D
    -+---------------
    α| 2 | 5 | 7 | 9
    -+---+---+---+---
    β| 5 | 8 | 1 | 4
    -+---+---+---+---
    γ| 3 | 7 | 9 | 2
    -+---+---+---+---
    δ| 6 | 0 | 5 | 1 In my case, the headers A-D and α-δ are enums. For a given RomanLetter (A-D) and GreekLetter (α-δ), I need the value. I have a set of data like this for each of a few thousand objects, though it could easily be a million some time in the future.
    I could create a class which has three attributes: an int, a RomanLetter, and a GreekLetter, create a collection of these objects, and then iterate over the collection until I find the one that matches, but I'd like to do something a little more elegant than that for performance reasons as well as for uniqueness (there should never be more than one number for any given pair).
    What would be the recommended way of doing this? A HashMap of HashMaps comes to mind, like so:
    HashMap<RomanLetter, HashMap<GreekLetter, Integer>> But that seems awfully confusing and not very scalable.
    I also thought of some kind of database-like data structure that I could query, but don't think this use case justifies using one of those fairly heavy-weight third-party solutions.
    Any ideas?

    JavaJason wrote:
    Yes, I could do either of those. I didn't use the correct term in my original post. I said it that approach wasn't very "scalable". What I meant to say is that in the future if, say, I need a value based on three or four or more attributes, the code will become an unmaintainable mess. So while I technically could do that, I'd like to do something a bit easier to maintain.This will work perfectly:
    Map<Pair<RomanLetter, GreekLetter>, Integer>Or rather,
    Map<YourKey, Integer>Now, you would define your key using RomanLetter and GreekLetter. If you need to add another attribute you would tweak the definition of YourKey. Seems very reasonable to me.
    >
    The other possibility I thought of was creating a multi-dimensional array. So in the case of my example, the multi-dimensional array would look much like the matrix I listed. I tend to shy away from using the index of arrays to represent a particular association, because I feel that the association is often not obvious and when things get changed down the road, the association will be broken. However, I suppose if I create the matrix based on the ordinal of the enum, if and when the enum changes, the matrix will as well.That's equivalent to the nested Maps you first suggested.

  • Java API, problem with secondary keys using multi key creator

    Hi,
    I'm developing an application that inserts a few 100k or so records into a Queue DB, then access them using one of four Hash SecondaryDatabases. Three of these secondary dbs use a SecondaryMultiKeyCreator to generate the keys, and one uses a SecondaryKeyCreator. As a test, I'm trying to iterate through each secondary key. When trying to iterate through the keys of any of the secondary databases that use a SecondaryMultiKeyCreator, I have problems. I'm attempting to iterate through the keys by:
    1: creating a StoredMap of the SecondaryDatabase
    2: getting a StoredKeySet from said map
    3: getting a StoredIterator on said StoredKeySet
    4: iterate
    The first call to StoredIterator.next() fails at my key binding (TupleBinding) because it is only receiving 2 bytes of data for the key, when it should be getting more, so an Exception is thrown. I suspected a problem with my SecondaryMultiKeyCreator, so I added some debug code to check the size of the DatabaseEntries it creates immediately before adding them to the results key Set. It checks out right. I also checked my key binding like so:
    1: use binding to convert the key object to a DatabaseEntry
    2: use binding to convert the created DatabaseEntry back to a key object
    3: check to see if the old object contains the same data as the new one
    Everything checked out ok.
    What it boils down to is this: my key creator is adding DatabaseEntries of the correct size to the results set, but when the keys are being read back later on, my key binding is only receiving 2 bytes of data. For the one SecondaryDatabase that doesn't use a SecondaryMultiKeyCreator, but just a SecondaryKeyCreator, there are no issues and I am able to iterate through its secondary keys as expected.
    EDIT: New discovery: if I only add ONE DatabaseEntry to the results set in my SecondaryMultiKeyCreator, I am able to iterate through the keys as I would like to.
    Any ideas or suggestions?
    Thank you for your attention,
    -Justin
    Message was edited by:
    Steamroller

    Hi Justin,
    Sorry about the delayed response here. I have created a patch that resolves the problem.
    If you apply the patch to your 4.6.21 source tree, and then rebuild Berkeley DB, the improper behavior should be resolved.
    Regards,
    Alex
    diff -rc db/db_am.c db/db_am.c
    *** db/db_am.c     Thu Jun 14 04:21:30 2007
    --- db/db_am.c     Fri Jun 13 11:20:28 2008
    *** 331,338 ****
           F_SET(dbc, DBC_TRANSIENT);
    !      switch (flags) {
    !      case DB_APPEND:
                 * If there is an append callback, the value stored in
                 * data->data may be replaced and then freed.  To avoid
    --- 331,337 ----
           F_SET(dbc, DBC_TRANSIENT);
    !       if (flags == DB_APPEND && LIST_FIRST(&dbp->s_secondaries) == NULL) {
                 * If there is an append callback, the value stored in
                 * data->data may be replaced and then freed.  To avoid
    *** 367,388 ****
    -            * Secondary indices:  since we've returned zero from an append
    -            * function, we've just put a record, and done so outside
    -            * __dbc_put.  We know we're not a secondary-- the interface
    -            * prevents puts on them--but we may be a primary.  If so,
    -            * update our secondary indices appropriately.
    -            * If the application is managing this key's data, we need a
    -            * copy of it here.  It will be freed in __db_put_pp.
    -           DB_ASSERT(dbenv, !F_ISSET(dbp, DB_AM_SECONDARY));
    -           if (LIST_FIRST(&dbp->s_secondaries) != NULL &&
    -               (ret = __dbt_usercopy(dbenv, key)) == 0)
    -                ret = __db_append_primary(dbc, key, &tdata);
                 * The append callback, if one exists, may have allocated
                 * a new tdata.data buffer.  If so, free it.
    --- 366,371 ----
    *** 390,401 ****
                /* No need for a cursor put;  we're done. */
                goto done;
    !      default:
    !           /* Fall through to normal cursor put. */
    !           break;
    !      if (ret == 0)
                ret = __dbc_put(dbc,
                    key, data, flags == 0 ? DB_KEYLAST : flags);
    --- 373,379 ----
                /* No need for a cursor put;  we're done. */
                goto done;
    !      } else
                ret = __dbc_put(dbc,
                    key, data, flags == 0 ? DB_KEYLAST : flags);
    diff -rc db/db_cam.c db/db_cam.c
    *** db/db_cam.c     Tue Jun  5 21:46:24 2007
    --- db/db_cam.c     Thu Jun 12 16:41:29 2008
    *** 899,905 ****
           DB_ENV *dbenv;
           DB dbp, sdbp;
           DBC dbc_n, oldopd, opd, sdbc, *pdbc;
    !      DBT olddata, oldpkey, newdata, pkey, temppkey, tempskey;
           DBT all_skeys, skeyp, *tskeyp;
           db_pgno_t pgno;
           int cmp, have_oldrec, ispartial, nodel, re_pad, ret, s_count, t_ret;
    --- 899,905 ----
           DB_ENV *dbenv;
           DB dbp, sdbp;
           DBC dbc_n, oldopd, opd, sdbc, *pdbc;
    !      DBT olddata, oldpkey, newdata, pkey, temppkey, tempskey, tdata;
           DBT all_skeys, skeyp, *tskeyp;
           db_pgno_t pgno;
           int cmp, have_oldrec, ispartial, nodel, re_pad, ret, s_count, t_ret;
    *** 1019,1026 ****
            * should have been caught by the checking routine, but
            * add a sprinkling of paranoia.
    !      DB_ASSERT(dbenv, flags == DB_CURRENT || flags == DB_KEYFIRST ||
    !            flags == DB_KEYLAST || flags == DB_NOOVERWRITE);
            * We'll want to use DB_RMW in a few places, but it's only legal
    --- 1019,1027 ----
            * should have been caught by the checking routine, but
            * add a sprinkling of paranoia.
    !       DB_ASSERT(dbenv, flags == DB_APPEND || flags == DB_CURRENT ||
    !             flags == DB_KEYFIRST || flags == DB_KEYLAST ||
    !             flags == DB_NOOVERWRITE);
            * We'll want to use DB_RMW in a few places, but it's only legal
    *** 1048,1053 ****
    --- 1049,1107 ----
                     goto err;
                have_oldrec = 1; /* We've looked for the old record. */
    +      } else if (flags == DB_APPEND) {
    +           /*
    +            * With DB_APPEND, we need to do the insert to populate the
    +            * key value. So we swap the 'normal' order of updating
    +            * secondary / verifying foreign databases and inserting.
    +            *
    +            * If there is an append callback, the value stored in
    +            * data->data may be replaced and then freed.  To avoid
    +            * passing a freed pointer back to the user, just operate
    +            * on a copy of the data DBT.
    +            */
    +           tdata = *data;
    +           /*
    +            * If this cursor is going to be closed immediately, we don't
    +            * need to take precautions to clean it up on error.
    +            */
    +           if (F_ISSET(dbc_arg, DBC_TRANSIENT))
    +                dbc_n = dbc_arg;
    +           else if ((ret = __dbc_idup(dbc_arg, &dbc_n, 0)) != 0)
    +                goto err;
    +
    +           pgno = PGNO_INVALID;
    +
    +           /*
    +            * Append isn't a normal put operation;  call the appropriate
    +            * access method's append function.
    +            */
    +           switch (dbp->type) {
    +           case DB_QUEUE:
    +                if ((ret = __qam_append(dbc_n, key, &tdata)) != 0)
    +                     goto err;
    +                break;
    +           case DB_RECNO:
    +                if ((ret = __ram_append(dbc_n, key, &tdata)) != 0)
    +                     goto err;
    +                break;
    +           default:
    +                /* The interface should prevent this. */
    +                DB_ASSERT(dbenv,
    +                    dbp->type == DB_QUEUE || dbp->type == DB_RECNO);
    +
    +                ret = __db_ferr(dbenv, "DBC->put", 0);
    +                goto err;
    +           }
    +           /*
    +            * The append callback, if one exists, may have allocated
    +            * a new tdata.data buffer.  If so, free it.
    +            */
    +           FREE_IF_NEEDED(dbenv, &tdata);
    +           pkey.data = key->data;
    +           pkey.size = key->size;
    +           /* An append cannot be replacing an existing item. */
    +           nodel = 1;
           } else {
                /* Set pkey so we can use &pkey everywhere instead of key.  */
                pkey.data = key->data;
    *** 1400,1405 ****
    --- 1454,1465 ----
      skip_s_update:
    +       * If this is an append operation, the insert was done prior to the
    +       * secondary updates, so we are finished.
    +       */
    +      if (flags == DB_APPEND)
    +           goto done;
    +      /*
            * If we have an off-page duplicates cursor, and the operation applies
            * to it, perform the operation.  Duplicate the cursor and call the
            * underlying function.

  • Multi key (or composite key) dimension for operational reporting

    Hi, I am creating operational reports in OBIEE 11g with PeopleSoft FSCM as source. As they are straight forward reports, I am planning to use OLTP tables directly for my OBIEE reporting.
    Here is the simplified scenario - ACCOUNT_TBL_VW is dimension table which has BUSINESS_UNIT & ACCOUNT_ID as keys.
    I have LEDGER Fact that has BUSINESS_UNIT, ACCOUNT_ID & other dimension keys with amount measures.
    How do I link my LEDGER Fact with ACCOUNT Dimension?
    Can I join multiple keys of Dimension with multiple keys of Fact? like this
    ACCDIM.BUSINESS_UNIT ---> LEDGFACT.BUSINESS_UNIT
    ACCDIM.ACCOUNT_ID ---> LEDGFACT.ACCOUNT_ID
    As it is operational reporting, I don't have any ETL type process to prepare single column primary key(surrogate key) in Dimension Table & modifying Fact Table with dimension surrogate key value.

    Hi,
    on the principal of how (in the absence of ETL); -
    1. Physical layer should reflect the actual physical joins, in some cases you may need the same table more than once to reflect self joins
    2. The business model layer is where you transform the physical into your desired star schema, hence here you will frequently (when using RDBMS tables) have numerous physical tables forming the source for a single logical table - this is also where you flatten the snowflake (or worse) into a star
    Make sense?
    regards,
    Robert.

  • How to input multi-key into card in JCOP with secure channel ?

    When I input multiple keys into JCOP ,it returs 6982. It seems I calculate the wrong C-MAC value. The steps as follows:
    //auth mac
    --> 80 50 00 00 08 DE 6E AB 3C 27 16 74 23 00
    <--00 00 71 25 00 11 96 91 17 84 FF 02 00 07 2E CC EB B6 BA 1F B0 9C 4D 0A 23 D8 39 1A 90 00
    --> 84 82 01 00 10 62 68 D5 CE 75 B6 39 41 14 E9 94 B1 50 E1 C8 49
    <--90 00
    //put keyset 1
    --> 84 D8 00 81 4B 01 80 10 6C CC 3D 43 CF C2 CD E6 CE AB C7 60 46 8B 7E FF 03 8B AF 47 80 10 6C CC 3D 43 CF C2 CD E6 CE AB C7 60 46 8B 7E FF 03 8B AF 47 80 10 6C CC 3D 43 CF C2 CD E6 CE AB C7 60 46 8B 7E FF 03 8B AF 47 27 02 3E BF DE 0E FE B6 00
    <--69 82
    When I auth without mac, I can put-keyset correctly.So It seems something wrong with C-MAC value.But I can send other command and get correct response with C-MAC.
    The source data I input to calculate C-MAC is:
    84 D8 00 81 4B 01 80 10 6C CC 3D 43 CF C2 CD E6 CE AB C7 60 46 8B 7E FF 03 8B AF 47 80 10 6C CC 3D 43 CF C2 CD E6 CE AB C7 60 46 8B 7E FF 03 8B AF 47 80 10 6C CC 3D 43 CF C2 CD E6 CE AB C7 60 46 8B 7E FF 03 8B AF 47.

    The reason you get an error is because you did not encrypt sensitive data. GP mandates that security domain keys must be encrypted with the encryption session key (derived from Data Encryption Key), regardless of the security level used.

  • [SOLVED?] Problem with multi key macros in emacs

    I recently made the switch from gentoo to arch, for the most part everything is up and working. The only thing I am having a problem with is GNU emacs, for some reason i can't use some macros that need more than 2 keys to be pressed. For example M-< will not work but for some reason C-_ will. I haven't got the faintest clue as to what the problem is. I am running xfce and using the us keyboard layout. If i run emacs outside of X than all the macros work fine. Any ideas?
    Thanks in advance.
    Last edited by flarkis (2010-03-01 22:57:24)

    seeing as this problem persists in both the terminal and gui versions i don't think that is possible. I also tried running both versions in twm to see if anything was different. The keys still aren't seen correctly but this time they are replaced with random characters that are not part of my keymap. An X11 problem or keyboard configuration problem?
    <?xml version="1.0" encoding="ISO-8859-1"?> <!-- -*- SGML -*- -->
    <deviceinfo version="0.2">
    <device>
    <match key="info.capabilities" contains="input.keymap">
    <append key="info.callouts.add" type="strlist">hal-setup-keymap</append>
    </match>
    <match key="info.capabilities" contains="input.keys">
    <merge key="input.xkb.rules" type="string">base</merge>
    <!-- If we're using Linux, we use evdev by default (falling back to
    keyboard otherwise). -->
    <merge key="input.xkb.model" type="string">keyboard</merge>
    <match key="/org/freedesktop/Hal/devices/computer:system.kernel.name"
    string="Linux">
    <merge key="input.xkb.model" type="string">evdev</merge>
    </match>
    <merge key="input.xkb.layout" type="string">us</merge>
    <merge key="input.xkb.variant" type="string" />
    </match>
    </device>
    </deviceinfo>
    Last edited by flarkis (2010-02-25 03:28:08)

  • Key frames switch to SMOOTH when they started as linear for multi key frame video animation ?

    When i create a series of animated moves on a freeze frame or pic...the second key frame which begins a "hold" ...always changes to smooth from linear after I add a few additional key frames and moves..  I use the key frame button on top left of viewer to add the key frames...I have tried adding the key frames in the inspector but smae results..2nd key frame changes to smooth after I add 4 additonal key frames and moves.  why?

    thanks for the reply Steve. I will battle through with this project and show the end result, but you may celebrate a birthday or six before I finish.But I will finish. It is part of a project I am creating from a recent stay on the Abrolhos Islands off the coast of Geraldton Western Australia. It is isolated like few places in the world, pristine and protected. We have friends who are proffessional fisherman and are allowed to stay there on shacks during the limited fishing/rock lobster fishing season.I have some really great photos and video to make use of.

  • Multi-key accelerator

    Hi,
    I want to assign a multi keyboard accelerator to a JMenuItem.
    (I want that the shortcut will be something like: Ctrl+P,M).
    How can I do it?
    Thanks,
    Efrat

    Hi,
    this can help:
    http://forum.java.sun.com/thread.jspa?threadID=735609&messageID=4228658
    L.P.

  • Multi-key storage

    are there any map or list, anything that can store data with same key?
    Thanks.
    Vincent

    I usually just put a List into the Map against the given key:
    public void add(Object key, Object item)
      List list = (List)map.get(key);
      if(list == null)
        list = new ArrayList();
        map.put(key, list);
      list.add(item);
    public void remove(Object key, Object item)
      List list = (List)map.get(key);
      if(list != null)
        list.remove(item);
    public Iterator get(Object key)
      List list = (List)map.get(key);
      if(list != null)
        return list.iterator();
      return null;
    }I know it's not quite the Map interface but you'll always differ from the API slightly since your get method doesn't return what was put in. The remove method could maybe do with some alteration so that it doesn't require a key.
    Hope this helps.

  • Key listeners triggering Flash IDE tools instead of SWF events

    During Test Movie in the Flash CS3 authoring environment,
    some keys are being trapped by Flash iteself and are not getting
    passed to my SWF. These are any that are assigned to Tools, like
    S(Ink Bottle), K (Paint Bucket), P (Pen), etc. The Test Movie SWF
    is the active window and I've clicked within it. Why are my keys
    getting trapped by Flash and not the SWF? Keys that are not
    assigned to Tools are working fine in my SWF.
    Any help greatly appreciated. Code snippets attached.
    SB

    Never mind... Test Movie's menu -> Disable Keyboard
    Shortcuts did the trick.

  • How to add key listeners to jcombobox

    i have been trying to add an key listener to jcombobox so that i can identify when an enter key is pressed.

    You should use an ActionListener to handle the enter key. See the section from the Swing toturial on "Using Combo Boxes":
    http://java.sun.com/docs/books/tutorial/uiswing/components/combobox.html#listeners

  • Key Listeners

    How to add java.awt.KeyListener to a javax.swing.JTree

    heres wat i am using the problem is that you can only hit one of the buttons at once i need to be able to hit shift and up at same time or conrotl and down and so on
    public void keyPressed(KeyEvent e)
         switch (e.getKeyCode())
              case KeyEvent.VK_DOWN:
              if (p2y <= 450)
                   p2y += 15;
              break;
              case KeyEvent.VK_UP:
              if (p2y >= -10)
                   p2y -= 15;
              break;
              repaint();
         switch (e.getKeyCode())
              case KeyEvent.VK_SHIFT:
              if (p1y >= -10)
                   p1y -= 15;
              break;
              case KeyEvent.VK_CONTROL:
              if (p1y <= 450)
                   p1y += 15;
              break;
              repaint();
                     }

  • Can someone help with key listeners... :(

    on (keyPress "q") {
    nextFrame();
    on (keyPress "w") {
    nextFrame();
    on (keyPress "e") {
    nextFrame();
    I'm creating an app for television that emulates a google search engine. The keypress codes i used were to "fake" a person entering a search field. My problem is the KeyPress command no longer works when fullscreen. I've read that keylisteners work fullscreen but am entirely unfamiliar with that code.
    If someone could provide me a script example that would effectively replicate the same function I would greatly appreciate it.

    Mo_73 wrote:
     I'm creating an app ...
    Using what - Flash, Flex, ActionScript, ...?  Please post in the appropriate forum; this is the Flash Player forum.

Maybe you are looking for