Multiple keystroke

hi,
I have an application, where
pressing key 'F' will open a Screen s1 and
pressing key 'G' will open a Screen s2.
If 'F' and 'G' keys are pressed simultaneously, both the screen is opened (s1 and s2).
But, i want only one of the screen to be opened.
How do i do it? How can i suppress multiple key stroke?
regards,
Deepa Raghuraman

How do i do it? How can i suppress multiple key stroke?You can't, so you need to add code to handle it yourself.
Keep track of the number of opened sceens. If a screen is already open when you press a key stroke then don't open a new screen.

Similar Messages

  • Multiple keystrokes selection for a JComboBox in JTable

    Has anyone used multiple keystrokes selection in a JComboBox inside JTable before? I can get it done outside JTable by using: http://javaalmanac.com/egs/javax.swing/combobox_CbMultiKey.html
    Looks like JTable has all kinds of problems to support JComboBox.
    Suggestions?
    Thanks,
    James

    If I read you right, you want to use a multiple keystroke combo box as an editor in a JTable?
    If you create the JComboBox as you would like it and then install it as an editor in the column(s) JTable the editor will work like the JComboBox
    Example:
    //- you would have that keyselection Manager class
    // This key selection manager will handle selections based on multiple keys.
    class MyKeySelectionManager implements JComboBox.KeySelectionManager {    ....    };
    //- Create the JComboBox with the multiple keystroke ability
    //- Create a read-only combobox
    String[] items = {"Ant", "Ape", "Bat", "Boa", "Cat", "Cow"};
    JComboBox cboBox = new JComboBox(items);
    // Install the custom key selection manager
    cboBox.setKeySelectionManager(new MyKeySelectionManager());
    //- combo box editor for the JTable
    DefaultCellEditor cboBoxCellEditor = new DefaultCellEditor(cboBox);
    //- set the editor to the specified COlumn in the JTable - for example the first column (0)
    tcm.getColumn(0).setCellEditor(cboBoxCellEditor); Finally, it may be necessary to to put a KeyPressed listener for the Tab key, and if you enter the column that has the JComboBox:
    1) start the editting
    table.editCellAt(row, col);2) get the editor component and cast it into a JComboBox (in this case)
    Component comp = table.getEditorComponent();
    JComboBox cboComp = (JComboBox) comp;3) give this compent the foucus to do its deed     
    cboComp.requestFocus();Hope this helps!
    dd

  • Multiple keystrokes on JMenuItem.setAccelarator(...)

    Hi all,
    I have search with out any good output on this so please help me.
    I have tried to find a way of seting a multiple keystrok on an accelarator, but with no luck!
    The goal is to make it possible to set whanted keystrok ike the following:
    Ctrl-F -N
    (Press Ctrl, press and relase F, press and relase N, and now the accelarator is woken and fired the command set by the JMenuItem)
    This is a code that Ive used for simple keystrokes,
    JMenuItem menuItem = new JMenuItem("Open", KeyEvent.VK_O);
    menuItem.setAccelerator(KeyStroke.getKeyStroke
       (KeyEvent.VK_O, ActionEvent.CTRL_MASK));but I whould like to use some thing like the following (if it existed... :-))
    for (Ctrl-F -O)
    menuItem.setAccelerator(
        KeyStroke.getKeyStroke(KeyEvent.VK_F,ActionEvent.CTRL_MASK),
        KeyStroke.getKeyStroke(KeyEvent.VK_O,ActionEvent.CTRL_MASK));(simply close to what the following code gives but not exact!)
    menuItem.setAccelerator(
        KeyStroke.getKeyStroke(KeyEvent.VK_F,
                        ActionEvent.CTRL_MASK + ActionEvent.CTRL_MASK));Best regards
    Rickard

    Outlook and Excel are different beasts on a Mac, and not as good if you're used to Office for Windows IMO so you have two choices:
    1) Get over it, and re-learn Outlook and Excel but be prepared for certain features to be missing; or
    2) Use bootcamp or a virtual machine to install your MS OS of choice and then install and use your favourite version of Office for Windows.
    Enjoy!

  • Multiple keystrokes in Word 5 in Classic

    There was one other thread (now closed to replies) with a similar problem. I just upgraded a bunch of computers at a newspaper from 9 to Tiger, and we're kind of stuck using Word 5 for a few more weeks. However, some of the workstations find that Word 5 will give them multiple instances of a character (like a sticky key would). This only happens in Word, and not to all; I can't find a common theme. The OS9 system is a fresh install, as is the Tiger (both cloned from a master drive.) Systems are blue&white G3s and Sawtooth G4s, and maybe some iMac G3s.
    I'd love to dump Word now but Quark 4 won't import RTF (without vast expenditure for an RTF XTension). We'll be using InDesign soon, which has no problems with RTF.
    Thanks
    --Colleen

    Its the same for me too. Just upgraded and find Word 98 is really sticky and I get multiple key strokes unexpectedly.
    Anyone found a solution yet?
    Does an upgrade to a later Word version help?
    Can you buy Word for Mac as a standalone or does it always come with Office (at an exorbitant price)?
    I am having EXACTLY the same problem on an iMac at
    home, but with Word 98. I just upgraded to OS 10.4.4
    from OS 9.2.2 and have not replaced my "classic"
    applications. When I try to type in Word 98, I get
    very frequent "sticky key" effects of repeated
    letters. Every once in a while a space becomes a tab
    instead of a space. Back-spacing goes wacky and
    erases back over several letters. There seems to be
    no rhyme or reason to this eccentric misbehavior.
    Because much of what I do is write in Word, my
    computer is now virtually unusable. Thinking of
    trashing OSX and just going back to 9.2.2 (except,
    of course, I can't get TurboTax for System 9 any
    more to do my taxes).
    I have tried throwing out the various Word preference
    files, but that doesn't help a bit.

  • Multiple keystrokes as accelarators

    Hi all,
    I need to set accelarators in a program, and three keys has to be used. For example, CTRL+N+F opens a new window. I have seen how to do this with two keys, for example CTRL+N, but not with two keys after the mask. Anyone knows how to do this?

    This is not so hard to do, but the basic question is harder...
    Eg. Masking the JMenuItem "Open" with Ctrl-Shift-O
    JMenuItem menuItem = new JMenuItem("Open", KeyEvent.VK_O);
    menuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_O,ActionEvent.CTRL_MASK + ActionEvent.SHIFT_MASK));
    but how you do a true "multi-masking" as mention in first message I also whant to know!
    Regards,
    Rickard

  • Catching multiple keystrokes?

    I have a function that tries to catch multiple key strokes...
    For example, I want to be able to press Alt + 1 and be able to send "hi" to a textInput. I found the code on how to do this on the Adobe site, but it doens't work correctly 100% of the time. Sometimes it will display "hi", other times it will display "1".
    private function keyHandler(event:KeyboardEvent):void {
                    var bShiftPressed:Boolean = event.shiftKey;
                    var bAltPressed:Boolean = event.altKey;
                    if (bAltPressed) {
                        switch(event.keyCode){
                            case Keyboard.NUMBER_1:
                                btnClick('hi');
                            break;
    Does anyone have any idea on how to make this work?

    yep, you'll have to dance around the fact that some key combinations are already defined for browser functionality. When the app gains focus it gains priority over some of them, but not all.
    i have examples of catching multiple key presses(in my example, cntrl+[key]) here
    http://www.mattlefevre.com/viewExample.php?tut=flex&proj=Capturing%20a%20Key%20Press
    but like i mention on that page too, you don't have the full range available to you.

  • Loss of multiple keystroke commands.

    Recently I've run into an issue with my wireless multi button mouse. My mac can't seem to register one key being pressed on my keyboard and then another on my mouse for a command. For example if I hold down shift and press a button on my mouse for the number 1 it types 1 and not !. So for a test I opened the virtual keyboard to see what the computer thought I was pressing. It brings up my standard laptop 101 key keyboard. I press and hold shift and it shows the same on my screen, but when I press the button for 1 on my mouse it then switches the virtual keyboard with a virtual external keyboard with full number pad. And the shift button becomes deselected even while holding it down.
    My theory is that it thinks I'm pressing one button on my laptop's keyboard and then pressing another key on an external keyboard, but I have no idea how to fix this. Keep in mind this was working fine the day before, and I have not installed anything new.
    Ideas on how to fix this?
    Macbook Air
    OSX 10.6.7
    Logitech G700
    Belkin n52e

    Answered my own question - you now have to touch the To: line once you have added one recipient to bring the + symbol back again and add further recipients. Don't know why Apple felt this was necessary as it adds extra key-strokes to the process but at least the feature is still there.

  • Does anyone know the apple script or unix command in ARD that allows me to send keystroke commands to computers on my ARD network ? thanks !

    I am trying to cue computers through keystroke commands using ARD
    I want to know a unix shell or script command to hit keystrokes on my ARD machines.
    EXAMPLE... I want machine X  to press the letter K.
    I am also wondering if you can send multiple commands doing this , multiple keystrokes with built in delays
    Thank you

    Welcome,
    I use the "System Events" handler, e.g.:
              tell application "System Events" to delay 5.5
              tell application "System Events" to keystroke "K"
              tell application "System Events" to delay 0.5
              tell application "System Events" to keystroke return
    Regards,
    Shawn

  • How can I create a new keyboard shortcut to toggle load images automatically preferrably with one action?

    I switch the load images automatically selection back and forth in order to save on my 5GB monthly data plan. Is there a utility that would allow me to create a macro of multiple keystrokes to do this with one action? Something like the macro function in Excel? Or is there another way to do this more easily than going to tools, options and clicking on the box? I don't see a shortcut for this item in the standard keyboard shortcuts list

    Hi,
    You could try [https://addons.mozilla.org/en-US/firefox/addon/image-block/?src=search Image Block]. Please also go through the reviews, help and ratings. You can also try to search for similar add-ons via Firefox '''Tools''' ('''Alt''' + '''T''') > '''Add-ons''', Search box on the top right corner, or via the official [https://addons.mozilla.org/ AMO].

  • Premiere Pro CC 2014 Sequence Running Very Slow

    Hello,
    I am working on a documentary project with over 500 hours of HD footage, and over 20,000 assets (according to PPro’s media loading indicator). The main file format is MXF (~50 Mbps), with some H.264, GoPro, and iPhone thrown in.
    My assistant is in the process of transcoding everything to ProRes 422 Proxy (~28 Mbps) 1920x1080, with the intent to upres to ProRes HQ once picture is locked. So footage is continually being off-lined and relinked as ProRes while I'm in this initial editing phase.
    I have only been editing for about a month, but it has been a smooth experience until about a week ago after I updated to CC 2014, turned Peak File Generation on, and my main sequence started getting over 30 minutes long. There are no added filters. It’s just basic footage and cuts.
    Now as soon as I start my project, it lags several seconds when I click in the timeline or press play - just any timeline action really. But it’s not consistent. It’s slow about 75% of the time. Sometimes it will be going fast, then when I quickly make multiple keystrokes it becomes a snail.
    When I’m in a smaller sequence of under 5 minutes, or just in the Project Panel, it runs much smoother, but is beginning to lag more often. And in the 30+ min sequence, it is slower when zoomed out than when zoomed in. But just the zooming in process is laggy.
    This is the main issue I’m having, and I’m concerned it will continue to get worse as the final project will be around 2 hours long, with a likely 4+ hour initial assembly. I'll eventually split it up into 10-20 minute reels, but am not at that stage yet. I'm aware this could be either a software issue on Adobe's part or workflow issue on my part. So any feedback is welcome.
    Here’s the fixes I’ve attempted so far:
    1) Cleaned the Media Cache Database, and have the Media Cache saving to a secondary internal HDD.
    2) Changed the Program preview from Full to 1/4 quality.
    3) Turned off Automatic Peak File Generation, but most clips already have them generated.
    4) In ‘Sequence Settings,’ turned off ‘Composite in Linear Color’ (since it requires GPU acceleration or max render quality.)
    5) Removed all the plug-ins (which are mostly Red Giant) from the MediaCore folder.
    6) Uninstalled CS6 programs, still have CC installed.
    6) Exported an XML, and re-imported into a fresh, new CC 2014 project and a CC (7.2.2) project.
    7) Reinstalled CC 2014.
    8) In Sequence Settings, changed Preview File Format from I-Frame Only MPEG to Apple ProRes 422 (Proxy)
    Same results throughout.
    Workstation Specs:
    Mac Pro 2012, OS 10.9
    2.4 GHz Quad-Core Intel Xeon
    24 GB Ram (18 dedicated to PPro)
    NVIDIA GeForce GT 640 Graphics card for dual monitors
    NVIDIA Quadro 4000 for Cuda GPU Processing
    Storage Specs:
    480 GB SSD for Startup & OS
    External 56 TB SAS RAID for media & project files
    Thanks in advance!
    Kenny Miracle

    Hi Kenny - i know your thread is from last year - but we just hopped on this board looking for answers to the exact same issues you described in your post.  Unfortunately i can't see that you found an answer on here.  Did you resolve your issues?  And if so, can you please either let us know or shoot us an email?  [email protected]
    many thanks

  • 2 Questions: Basic Shape / Go to Master Page

    Hi. My questions revolve around InDesign CS4 for Mac.
    Specs: PowerMac G5, 1.8Ghz, 4GB ram, 435GB hd, OSX 10.5.8, IDCS4, Suitcase Fusion 2 (if any of that matters).
    I have a basic shape question that is perplexing me. I'm a 12 year QuarkXPress user who converted to ID CS4 last year by choice (to gain the experience under employ) so there are things here and there that cause me confusion.
    In any case my question is this. How can I convert a rectangle frame to a perfect square frame?
    Specifically, if I drop in an image, and the frame is rectangular how can I make it a perfect square using keyboard shortcuts? I realize I can create a new frame and constrain proportions as I draw it to get a perfect square, then cut and then paste the image into that, or I can transform the frame by entering equal values in the transform panel or control palette. Which would answer my question if this was not something XPress can do effortlessly.
    If you draw a shape (box) in XPress and then hold down the SHIFT key XPress will immediately transform the shape into either a perfect square or circle depending on which tool you are using. Release and you have a perfect square or circle. But you cannot seem to do this in ID after you have already drawn an rectangle?
    Is there any way around this that does not involve multiple keystrokes or drawing a new frame?
    Second question. Anyway to go direct to master pages without having to use CMD+J and then enter the MP letter? In XPress OPTN+F10 will take you directly there and directly back.
    P.S. Not trying to start an XPress/ID discussion. Just trying to learn this program and XPress is the only reference I have.
    Thanks for any advice/tips in advance.

    Keyboard shortcut for these operation , you already know the standard method , but if you want some kind of one step procedure then scripting can help.
    Post your query on the Indesign scripting forums , someone may come up with the script to select the master page and change the rectangle to square.
    and you can define the keyboard shortcut to run this scripts ,,,one step procedure.

  • Imac g5 ALS will not boot from internal HD or portable drive or eject disc

    I cannot get my g5 ambient light sensor Imac to boot from the internal hard drive or a portable drive. I have tried multiple keystroke combinations (c + power on, option + power on, and others) upon startup and all get the same response: the computer powers on and the screen displays the apple logo. after a minute or two, the screen darkens, and a multilingual message appears telling me that I need to restart the computer. I cannot get far enough to start from a different drive or a system software disk. I cannot eject the disc currently in the drive. I cannot run any diagnostic software, cannot reinstall system software or put another disc in the drive. obviously, I am experiencing hard drive problems, but I cannot seem to get past this frustrating stumbling block. any troubleshooting or problem solving would be greatly appreciated. I have checked other discussions and support forums, but cannot find any that reference the specifics that I have mentioned. I have researched and tried the logic board check and many other potential "solutions", but none of the discussions mention the gray screen "you must restart your computer" message that I continually receive.

    What you are experiencing is called a Kernel Panic.
    First, to get the disc out of the drive, hold the mouse button down as you reboot.
    Have you tried resetting the SMU?
    1. Turn off the computer by choosing Shut Down from the Apple menu, or by holding the power button until the computer turns off.
    2. Unplug all cables from the computer, including the power cord.
    3. Wait 10 seconds.
    4. Plug in the power cord while simultaneously pressing and holding the power button on the back of the computer.
    5. Let go of the power button.
    6. Press the power button once more to start up your iMac.
    Then try booting from your install disc and running Disk Utility:
    1. Insert the Mac OS X Install disc that came with your computer, then restart the computer while holding the C key.
    2. When your computer finishes starting up from the disc, choose Disk Utility from the Installer menu. (In Mac OS X 10.4 or later, you must select your language first.)
    Important: Do not click Continue in the first screen of the Installer. If you do, you must restart from the disc again to access Disk Utility.
    3. Click the First Aid tab.
    4. Click the disclosure triangle to the left of the hard drive icon to display the names of your hard disk volumes and partitions.
    5. Select your Mac OS X volume.
    6. Click Repair. Disk Utility checks and repairs the disk.
    Please post back with results,

  • Kensington Expert Mouse Pro (64213) with FCP 5

    I was looking into buying the Kensington Expert Mouse Pro to use with Final Cut Pro 5. Does anyone know if you are able to program the 6 buttons on the top of the mouse as hotkeys for different tools within FCP? Thanks for your help!
    -Curtis
    Power Mac G5   Mac OS X (10.4.5)  

    Curtis,
    I've been using the Expert Mouse for a very long time now. All 4 buttons, the click wheel button and the 6 up top are all customizable.
    I have the 6 top button programed to do functions in FCP that require multiple keystrokes, like audio video transition, clear in and out, etc.
    The mouse uses the Kensington software that is avalable in the OS System Prefs once installed.
    Good Luck!
    Allan Spiers
    Sling Stone Productions
    G5 Dual 2.7   Mac OS X (10.4.6)   4.5 GB Ram

  • How can I use the "home" and "end" buttons

    I have an external apple keyboard (full style, with number pad and all) plugged into my macbook.  However, the "home" and "end" buttons don't function the way I'd like (i.e. they don't go to the beginning or end of a line).
    Can I ever get this to work or does it just not function with a laptop that doesn't have that function in the first place.  I'd like to not have to use multiple keystrokes just to get a similar home/end result.
    Thanks!

    "on your hub dont use the phone it will cost you more.when i change over to bt they never told me that i would be charged for useing this phone so i dont now.crafty bt again.when my contract is up i will be leaveing bt for ever,georgesaa."
    Not sure why you are charged for calls on this, as standard you would get free evening and weekends and there are packages for unlimited anytime.
    (If I have helped you in any way to say "Thank You" please click on the star next to the message. Thank You)
    If I have solved your Issue please click the "Mark as accepted solution" button.

  • Repeating mundane tasks - Can I Automate

    To be brief: I'm currently working on development notes for an animated music clip.
    I am exporting certain frames (roughly 1-3 frames per shot) and bringing them into photoshop to do mark-ups and resize. The later is easliy done with the action function.
    THE QUESTION:
    Am I able to automate my export process so that I can use a single command or limited number of commands to:
    jump to next maker > make freeze frame > export as Jpeg > repeat
    Failing this am I able to use Mac's Automator - this program doesn't seem to support FCP?
    Any assistance would be appreciated.
    Cheers!

    fcp doesn't have built-in support for applescript or automator but you can use gui scripting to do this
    http://www.apple.com/applescript/uiscripting/index.html
    alternatively you can (buy) use a utility like QuickKeys to perform multiple keystrokes
    http://www.quickeys.com/products/qkx.html

Maybe you are looking for