Keyboard input for plugins

Hi,
Is there some way I can assign keyboard input exclusively to plugin windows when they're in focus. Currently, when I type numbers or use the cursors, Logic is responding behind the plugin window and the plugins do not get the key press notifications. This means I can only use the mouse to enter input - that makes entering a License Key VERY DIFFICULT if it includes numbers!
Thanks in advance for your help,
Alex

Just to clarify... I'm talking about my laptop keyboard, not a musical keyboard.
I'm kind of bummed that nobody has replied yet... can I be the only person who is having this problem?!?
I've tried this with native plugins too and get the same problem. The Logic Express 8 manual states that you can alter the value in a plugin by clicking on the numeric display and typing in on the keyboard. I tried that but when I try to type, the numbers activate their associated 'screensets'. I've even unmapped the number keys from the screensets and am able to use the numbers now, but there are other keys that do undesirable things in Logic that I don't want to have to 'unmap'. Also, I want to be able to use the cursor keys 'up' 'down' etc to choose options in plugins - but they change channels etc in Logic instead of being picked up in the plugin.
I can't be the only person with this problem can I? Please if you're reading this can you give it a try and post back here describing your experiences.
THANKS!
Alex

Similar Messages

  • Keyboard input for a nubie!!!!

    Can anyone help me with writng a method that accepts all keyboard input and writes it to a file? I.e. whenever a key is pressed (only letters and numbers), it is accepted even if no programs are running and no text editor is being used.
    This will help me great deal and I would be very appreciative for any help I might receive.
    Thanking any response
    ChaosSupreme

    Is this like making a key logger? It takes down all your input and saves it to a file? If it is I'm sure there are plenty of tutorials on how to make a key logger out there.
    I guess you would have to look up buffered writer and rile writer methods, although I think they are just through a text editor or program.
    Andy

  • Set up midi notes input for plugin like Harmony engine evo

    Hi!
    Can anyone tell me how to set up for midi notes input to a plugin. Lets say you have a keyboard that sends notes info and it works fine to run an instrument in a instrument  channel with it. Now, if you want to send this notes to a audio plugin like Harmony engine Evo from Antares that resides in a audio channel, how do you do it? It seems like the only midi you can get thru is controller messenges and thats not of any help to create harmonies from midi chord.

    I think this is the standard chat about getting those tracks in the autoload to get the instrument to sound, as in getting the QT instruments to sound when they play MIDI on those tracks...
    For those who posted.. A couple of tips -
    1) Read the manual about audio instruments
    2) Check out David's thread called Troubleshooting tips for new users or something like that. I'm sure he will correct me.
    If you still can't get it to happen, let us know. In general, the Logic EXS sounds will be better that the QT sounds, so you might as well ignore them really.
    Best, Fred

  • Mac Feature Request - Keyboard Accelerators for Plugin Extras

    People on Macs who use plugins for which quick access is desired are being shortchanged by the omission of the keyboard shortcuts that Windows users enjoy.

    Ah, that very useful Windows feature is simply missing from OSX. Nothing Adobe can do about that as its an OS feature and there's no way Apple will introduce something Windows can do unless they can disguise the fact somehow.

  • Can you disable shortcuts for plugins in Logic 8?

    Hi all,
    Does anybody know how I can turn off keyboard shortcuts for plugins in Logic 8?
    Specifically, I've been using FAW's Circle a lot lately, and when I'm in one of the windows there is a button that defaults to "randomize". Sadly that button is Enter, which I use to Play.
    So, often I will be tweaking a patch and hit Enter to hear it in context and it will mess up all my settings! Of course, there's no way to undo that either. Drrrrr.
    I could have sworn I saw something about that in the manual the other day but I've just been through it and I can't seem to find it anywhere. It's probably right in front of me.
    thanks!
    Matthew

    Does anybody know how I can turn off keyboard shortcuts for plugins in Logic 8?
    Specifically, I've been using FAW's Circle a lot lately, and when I'm in one of the windows there is a button that defaults to "randomize". Sadly that button is Enter, which I use to Play.
    So, often I will be tweaking a patch and hit Enter to hear it in context and it will mess up all my settings! Of course, there's no way to undo that either. Drrrrr.
    I could have sworn I saw something about that in the manual the other day but I've just been through it and I can't seem to find it anywhere. It's probably right in front of me.
    It's very annoying isn't it. I am constantly irritated by my usual Logic keycommands being overridden just because I happen to have a plug in editor window selected. Same thing happens to me often with Reaktor, enter seems to just load up the next ensemble in the list, so hey presto I lose all my settings.
    I know in Pro Tools there is (or at least used to be) a setting to allow keyboard input to pass through to plug ins, or to disable it. Logic should absolutely have this function as well, and it should have a simple toggle switch to turn it on or off. I've already written to Logic feedback about this, but you should do the same, the more complaints they get about it the better.
    http://www.apple.com/feedback/logicpro.html

  • Lag keyboard input

    Hi, I have an issue with my first LabView program can anyone help me please?
    The function of my program is to manualy or automaticaly save the data obtained with the multimeter
    My program worked fine until I wanted to add a file creation function each time the program runs, but the program creates a file every 5 seconds, I have tried using a loop and case but I cant make it work, it still creates a file every 5 seconds.
    Any tips?
    Aditionaly I have tried to program a keyboard input for the buttons in the vi using a few examples I found around the forum but my program just lags and I cant even start measuring.
    I atach my vi for inspection , thanks in advance
    Attachments:
    maybe.vi ‏32 KB

    It probably shouldn't damage anythin constantly updating the loop, although it does introduce overhead and is generally not tidy, to avoid the constant updating I would recommend looking into shift-registers or feedback nodes. On that note, I'll leave you with this snippet, I'm sure you can see how it might apply.
    [Side-note; In case you don't know how to use a snippet, download and save the image, then drag the file from your explorer into a block diagram.]
    Attachments:
    Feedback Node.png ‏19 KB

  • Safari 7.1 blocks all keyboard input in Flash app

    Safari 7.1 on OSX 10.9.5 blocks any and all keyboard input for FlashPlayer applications!! Everything worked fine until the upgrade to Safari 7.1 and OSX 10.9.5. Tried FlashPlayer 14 and the latest 15 -- still no keyboard input, not even in debug mode (I'm a developer of enterprise apps for browsers).
    The same app still works just fine in Firefox and Google Chrome! Is this just a mishap on Apple's side? Or just another hit to kill off the most productive computer language I've ever used (and I used Apple's own Objective-C as well)??
    Come on Apple! I love you guys and use your products a lot, but is this really necessary for the most powerful and valuable company in the world -- to hurt a language with such tricks that doesn't do you any harm at all?? This makes you look more like the "PC guy" from your own former commercials (instead of the lovable "Mac guy") ...

    From the menu bar, select
               ▹ System Preferences… ▹ Flash Player ▹ Advanced
    and click Delete All. Close the preference pane.
    From the Safari menu bar, select
              Safari ▹ Preferences... ▹ Privacy ▹ Remove All Website Data
    and confirm. Test.

  • Keyboard input not working at boot

    Hello --
    I don't get keyboard input for ~30 seconds at boot, and I'm not sure why. I'm using a hand-rolled kernel with no initrd, though when I use the stock Arch kernel with initrd it does the same thing. According to my kernel logs, the keyboard is recognized before the root filesystem is mounted (and it appears to be PS2, not USB), and from reading the rc scripts, little or nothing happens after the ttys are started.
    udev starts before the root fs is mounted, and when root is fscked at boot, I don't encounter this problem. Therefore I think udev is at fault. Via I can't find any information on telling udev to deal with the keyboard earlier.
    Any ideas on how to fix this? Other than putting "sleep 30" in my rc scripts, that is.

    Sorry, I wasn't being very clear.
    I'm using a laptop, and lsusb doesn't report anything except the buses themselves. Therefore I concluded that my keyboard is not a USB keyboard, as I mentioned above.
    This is booting to a tty console, not to X, so it can't be a KDE issue. And I have full control of my keyboard with GRUB; it's just the kernel that hesitates to acknowledge its existence.

  • Simple Keyboard input?

    I am a new programmer trying to create a simple keyboard input for a Jframe, if that is possible. Here is a simple jframe creation:
        public static void main(String[] args) {
            JFrame frame = new JFrame("Keyboard input");
            frame.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
            // make window visible
            frame.pack();
            frame.setVisible(true);
        If I wanted to make a class that would put a ball in the frame and have the ball move up, down, left, or right according to which arrow keys were pressed and held- how would I do that?
    Thanks for your help,
    Sam

    See classes KeyListener and KeyAdapter
    And reed the Manual

  • Keyboard Input

    http://www.rafb.net/paste/results/D3082433.html
    In that link are all three of my classes (UserInterface.java, CalcEngine.java, and Calculator.java)
    I'm trying to do keyboard input for the numbers, the decimal, all the operations and enter. But the way I have it set up, I can't get any of the methods in the CalcEngine.java to run once a button is pressed. It's hard for me the explain, but if you compile it and try looking at the code, you'll understand what I mean.
    -sachit

    Alright, I'll post the 3 classes here.
    #### UserInterface.java ####
    // Date Started: March 1, 2004
    // Date Finished: March 26, 2004
    // Program Description: A graphical user interface for the calculator.
    //                              No calculation is being done here. This class is
    //                              responsible just for putting up the display on
    //                              screen. It then refers to the "CalcEngine" to do
    //                              all the real work.
    import java.awt.*;
    import java.awt.event.*;
    public class UserInterface implements KeyListener
         private CalcEngine calc;
         Frame panelFrame=new Frame("Non-Scientific Calculator");
         static Label displayLabel;
         static String button="";
         // Method Name: UserInterface()
         // Parameters Passed: None
         //     Data Returned: None
         //     Method Purpose: A user interface for the given calcEngine.
         public UserInterface()
              makeFrame();
              panelFrame.setVisible(true);
         // Method Name: setVisible()
         // Parameters Passed: boolean variable visible
         //     Data Returned: None
         //     Method Purpose: Sets the panalFrame interface visible.
    public void setVisible(boolean visible)
              panelFrame.setVisible(visible);
         // Method Name: makeFrame()
         // Parameters Passed: None
         //     Data Returned: None
         //     Method Purpose: The full display of buttons and labels on the calculator.
         private void makeFrame()
              CalcEngine buttonHandler = new CalcEngine();
              Button[] myButtons=new Button[30];
              String[] labels={"","","BS","CE","C","PI","sin","cos","tan","%","sqrt","7","8","9","/","x�","4","5","6","x","1/x","1","2","3","-","-/+","0",".","=","+"};
              Font titleFont=new Font("Courier", Font.BOLD,20);
              Font buttonFont=new Font("Arial", Font.BOLD,13);
              String display="0";
              displayLabel=new Label(display);
              String info = buttonHandler.getInfo();
              Label infoLabel=new Label(info);
              //Labels all the buttons
              for(int i=0;i<myButtons.length;i++)
                   myButtons=new Button(labels[i]);
              panelFrame.setLayout(new BorderLayout(4,5));
              panelFrame.setBackground(Color.gray);
                   displayLabel.setFont(titleFont);
                   displayLabel.setAlignment(Label.RIGHT);
                   panelFrame.add("North",displayLabel);
              Panel secondPanel=new Panel();
              panelFrame.add("Center",secondPanel);
              secondPanel.setLayout(new GridLayout(6,5,5,2));
              secondPanel.setBackground(Color.gray);
                   for(int i=0; i<myButtons.length; i++)
                        secondPanel.add(myButtons[i]);     
                        myButtons[i].setFont(buttonFont);
                        myButtons[i].addKeyListener(this);
                        myButtons[i].addActionListener(buttonHandler);
                   myButtons[0].setBackground(Color.gray);
                   myButtons[0].hide();
                   myButtons[1].hide();
                   panelFrame.add("South",infoLabel);
              panelFrame.resize(270,250);
              panelFrame.show();
         // Method Name: redisplay()
         // Parameters Passed: None
         //     Data Returned: None
         //     Method Purpose: Updates the display of the current number being inputed.
         //                         Also truncates the decimal if it is ".0".
         public static void redisplay()
              boolean itsInt=false;
              int doubleChecker = (int)CalcEngine.getDisplayValue();
              int intValue=0;
              if(CalcEngine.getDisplayValue() == (float)doubleChecker)
                   intValue=(int)Math.round(CalcEngine.getDisplayValue());
                   itsInt=true;
              if(itsInt)
                   displayLabel.setAlignment(Label.RIGHT);
                   displayLabel.setText("" +intValue);
              else
                   displayLabel.setAlignment(Label.RIGHT);
                   displayLabel.setText("" + CalcEngine.getDisplayValue());
         public void keyTyped(KeyEvent e)
              char keyChar = e.getKeyChar();
              button=""+keyChar;
              CalcEngine calcEng= new CalcEngine();
              if(keyChar == '+')
                   System.out.println("+ PRESSED!");
              else if(keyChar == '-')
                   System.out.println("- PRESSED!");
              else if(keyChar == KeyEvent.VK_SLASH)
                   System.out.println("/ PRESSED!");
              else if(keyChar == '*')
                   System.out.println("x PRESSED!");
              else if(keyChar == KeyEvent.VK_1)
                   System.out.println("1 PRESSED!");
              else if(keyChar == KeyEvent.VK_2)
                   System.out.println("2 PRESSED!");
              else if(keyChar == KeyEvent.VK_3)
                   System.out.println("3 PRESSED!");
              else if(keyChar == KeyEvent.VK_4)
                   System.out.println("4 PRESSED!");
              else if(keyChar == KeyEvent.VK_5)
                   System.out.println("5 PRESSED!");
              else if(keyChar == KeyEvent.VK_6)
                   System.out.println("6 PRESSED!");
              else if(keyChar == KeyEvent.VK_7)
                   System.out.println("7 PRESSED!");
              else if(keyChar == KeyEvent.VK_8)
                   System.out.println("8 PRESSED!");
              else if(keyChar == KeyEvent.VK_9)
                   System.out.println("9 PRESSED!");
              else if(keyChar == KeyEvent.VK_0)
                   System.out.println("0 PRESSED!");
              else if(keyChar == KeyEvent.VK_ENTER || keyChar == KeyEvent.VK_EQUALS)
                   calcEng.equals();
                   System.out.println("= PRESSED!");          
              else if(keyChar == KeyEvent.VK_PERIOD)
                   System.out.println(". PRESSED!");
              /*else
                   /// QUESTION: what do these next two lines do?
                   byte bytes[] = {(byte)keyChar};
                   System.out.println(bytes);
                   //     command = new String(bytes);
         public static String passButton()
              return button;
         public void keyPressed(KeyEvent e)
         public void keyReleased(KeyEvent e)
    #### CalcEngine.java #####
    // Date Started: March 1, 2004
    // Date Finished: March 26, 2004
    // Program Description: Does all the calculations for the calculator.
    import java.awt.event.*;
    import java.awt.*;
    public class CalcEngine implements ActionListener
         final int ARRAY_SIZE=100;
         String []buttonPressed = new String[ARRAY_SIZE];
         String buttonCheck="";
         static String userDisplay="";
         int numberLength=0;
         int currentNumber=0;
         int previousNumber=0;
         int currentElement=0;
         boolean allowDecimal=true;
         boolean cEPressed=false;
         String buttonCheckKey;
         // Method Name: CalcEngine()
         // Parameters Passed: None
         //     Data Returned: None
         //     Method Purpose: Instance of the CalcEngine.
         public CalcEngine()
              buttonCheckKey=UserInterface.passButton();
              buttonCheck=buttonCheckKey;
              System.out.println("ButtonCheckKey " +buttonCheck);
              if(buttonCheck=="=")
                   if(currentElement>=2 && !buttonPressed[currentElement].equals(""))
                        equals();
              else if(buttonCheck.equals("C"))
                   clear();
              else if(buttonCheck.equals("CE"))
                   clearOne();
              else if(buttonCheck.equals("BS"))
                   backSpace();
              else if(buttonCheck.equals("sqrt"))
                   squareRoot();
              else if(buttonCheck.equals("sin") || buttonCheck.equals("cos") || buttonCheck.equals("tan"))
                   trig(buttonCheck);
              else if(buttonCheck.equals("PI"))
                   numPI();
              else if(buttonCheck.equals("1/x"))
                   oneOver();
              else if(buttonCheck.equals("x�"))
                   powerTwo();
              else if(buttonCheck.equals("-/+"))
                   negPos();
              //else if(buttonCheck.equals("."))
              //     decimal(event);
              else if((buttonCheck.equals("+") || buttonCheck.equals("-") || buttonCheck.equals("x") || buttonCheck.equals("/") || buttonCheck.equals("%")) && !buttonPressed[currentElement].equals(""))
                   operations(buttonCheck);
              //else     
              //     allNumbers(event);
              System.out.println("1st: "+buttonPressed[0]+ "\n2nd: " buttonPressed[1] "\n3rd: " buttonPressed[2] "\n4th: " buttonPressed[3] "\n5th: " +buttonPressed[4]);
              System.out.println("6th: "+buttonPressed[5]+ "\n7th: " buttonPressed[6] "\n8th: " buttonPressed[7] "\n9th: " buttonPressed[8]"\n");
         // Method Name: getDisplayValue()
         // Parameters Passed: None
         //     Data Returned: float variable N/A
         //     Method Purpose: Retrived the updated number to display on the calculator
         //                         and passes it as a double.
    public static double getDisplayValue()
              return Double.valueOf(userDisplay).doubleValue();
         // Method Name: actionPerformed()
         // Parameters Passed: ActionEvent variable event
         //     Data Returned: None
         //     Method Purpose: Run the correct method depending on what button is pressed.
         public void actionPerformed(ActionEvent event/*, String button, boolean keyBoard*/)
              //Removes null from buttonPressed array
              for(int i=0; i<buttonPressed.length; i++)
                   if(buttonPressed[i]==null)
                        buttonPressed[i]="";
              numberLength++;
              buttonCheck=event.getActionCommand();     //Gets the button that was pressed
              //Runs the correct method depending on which button is pressed
              if(buttonCheck=="=")
                   if(currentElement>=2 && !buttonPressed[currentElement].equals(""))
                        equals();
              else if(buttonCheck.equals("C"))
                   clear();
              else if(buttonCheck.equals("CE"))
                   clearOne();
              else if(buttonCheck.equals("BS"))
                   backSpace();
              else if(buttonCheck.equals("sqrt"))
                   squareRoot();
              else if(buttonCheck.equals("sin") || buttonCheck.equals("cos") || buttonCheck.equals("tan"))
                   trig(buttonCheck);
              else if(buttonCheck.equals("PI"))
                   numPI();
              else if(buttonCheck.equals("1/x"))
                   oneOver();
              else if(buttonCheck.equals("x�"))
                   powerTwo();
              else if(buttonCheck.equals("-/+"))
                   negPos();
              else if(buttonCheck.equals("."))
                   decimal(event);
              else if((buttonCheck.equals("+") || buttonCheck.equals("-") || buttonCheck.equals("x") || buttonCheck.equals("/") || buttonCheck.equals("%")) && !buttonPressed[currentElement].equals(""))
                   operations(buttonCheck);
              else     
                   allNumbers(event);
              System.out.println("1st: "+buttonPressed[0]+ "\n2nd: " buttonPressed[1] "\n3rd: " buttonPressed[2] "\n4th: " buttonPressed[3] "\n5th: " +buttonPressed[4]);
              System.out.println("6th: "+buttonPressed[5]+ "\n7th: " buttonPressed[6] "\n8th: " buttonPressed[7] "\n9th: " buttonPressed[8]"\n");
         // Method Name: clear()
         // Parameters Passed: None
         //     Data Returned: None
         //     Method Purpose: Is run if the "C" button is pressed. Clears all the numbers
         //                         inputted into the calculator.
         public void clear()
              for(int i=0; i<buttonPressed.length; i++)
                        buttonPressed[i]="";
              userDisplay="0";
              currentElement=0;
              numberLength=0;
              UserInterface.redisplay();
         // Method Name: clearOne()
         // Parameters Passed: None
         //     Data Returned: None
         //     Method Purpose: Is run if the "CE" button is pressed. Deletes the last
         //                         entire number inputted into the calculator. For example,
         //                         if "5x123" was inputted, it would go back to "5x".
         public void clearOne()
              if(currentElement >= 2)
                   buttonPressed[currentElement]="";
                   userDisplay=buttonPressed[currentElement-2];
                   numberLength=0;
                   cEPressed=true;
                   UserInterface.redisplay();
         // Method Name: backSpace()
         // Parameters Passed: None
         //     Data Returned: None
         //     Method Purpose: Is run if the "BS" button is pressed. Deletes the last
         //                         number inputted into the calculator. For example,
         //                         if "5x123" was inputted, it would go back to "5x12".
         public void backSpace()
                   int stringSize=buttonPressed[currentElement].length();
                   buttonPressed[currentElement] = userDisplay.substring(0, userDisplay.length() - 1);
                   userDisplay=buttonPressed[currentElement];
                   UserInterface.redisplay();
         // Method Name: trig()
         // Parameters Passed: String variable buttonCheck
         //     Data Returned: None
         //     Method Purpose: Is run if the "sin", "cos", or "tan" button is pressed.
         //                         Finds the sin, cos or tan of the current number.
         public void trig(String buttonCheck)
              if(buttonCheck.equals("sin"))
                   double sinThisNum=Double.valueOf(buttonPressed[currentElement]).doubleValue();
                   double sinNum=Math.sin(sinThisNum);
                   buttonPressed[currentElement]=""+sinNum;               
              else if(buttonCheck.equals("cos"))
                   double cosThisNum=Double.valueOf(buttonPressed[currentElement]).doubleValue();
                   double cosNum=Math.cos(cosThisNum);
                   buttonPressed[currentElement]=""+cosNum;                              
              else if(buttonCheck.equals("tan"))
                   double tanThisNum=Double.valueOf(buttonPressed[currentElement]).doubleValue();
                   double tanNum=Math.tan(tanThisNum);
                   buttonPressed[currentElement]=""+tanNum;                              
              userDisplay=buttonPressed[currentElement];
              UserInterface.redisplay();
         // Method Name: squareRoot()
         // Parameters Passed: None
         //     Data Returned: None
         //     Method Purpose: Is run if the "sqrt" button is pressed. Sqaures the current
         //                         number.
         public void squareRoot()
              if(currentElement==0 || currentElement % 2==0)
                   double rootThisNum=Double.valueOf(buttonPressed[currentElement]).doubleValue();
                   double rootedNum=Math.sqrt(rootThisNum);
                   buttonPressed[currentElement]=""+rootedNum;
                   userDisplay=buttonPressed[currentElement];
                   UserInterface.redisplay();
         // Method Name: numPI()
         // Parameters Passed: None
         //     Data Returned: None
         //     Method Purpose: Is run if the "PI" button is pressed. Allows the user to
         //                         input the value of PI.
         public void numPI()
              double PInumber=Math.PI;
              buttonPressed[currentElement]=""+PInumber;
              userDisplay=buttonPressed[currentElement];
              UserInterface.redisplay();
         // Method Name: oneOver()
         // Parameters Passed: None
         //     Data Returned: None
         //     Method Purpose: Is run if the "1/x" button is pressed. This will divide
         //                         the current number by 1.
         public void oneOver()
              if(currentElement==0 || currentElement % 2==0)
                   double oneOverNum=Double.valueOf(buttonPressed[currentElement]).doubleValue();
                   oneOverNum=1/oneOverNum;
                   buttonPressed[currentElement]=""+oneOverNum;
                   userDisplay=buttonPressed[currentElement];
                   UserInterface.redisplay();
         // Method Name: powerTwo()
         // Parameters Passed: None
         //     Data Returned: None
         //     Method Purpose: Is run if the "x^2" button is pressed. This will take the
         //                         current number to the power 2.
         public void powerTwo()
              if(currentElement==0 || currentElement % 2==0)
                   double powNum=Double.valueOf(buttonPressed[currentElement]).doubleValue();
                   powNum=Math.pow(powNum,2);
                   buttonPressed[currentElement]=""+powNum;
                   userDisplay=buttonPressed[currentElement];
                   UserInterface.redisplay();
         // Method Name: negPos()
         // Parameters Passed: None
         //     Data Returned: None
         //     Method Purpose: Is run if the "-/+" button is pressed. Toggles the number
         //                         between a negative and positive value.
         public void negPos()
              if(userDisplay.charAt(0)!='-')
                   userDisplay="-"+userDisplay;
              else
                   userDisplay=userDisplay.substring(1);
              buttonPressed[currentElement]=userDisplay;
              UserInterface.redisplay();
         // Method Name: decimal()
         // Parameters Passed: ActionEvent variable event
         //     Data Returned: None
         //     Method Purpose: Is run if the "C" button is pressed. Clears all the numbers
         //                         inputted into the calculator.
         public void decimal(ActionEvent event)
              if(allowDecimal)
                   buttonPressed[currentElement]+=event.getActionCommand();
                   userDisplay+=event.getActionCommand();
                   allowDecimal=false;
                   UserInterface.redisplay();
         // Method Name: operations()
         // Parameters Passed: String variable buttonCheck
         //     Data Returned: None
         //     Method Purpose: Is run if the "+","-","x","/","%" button is pressed. Depending
         //                         on which operation is selected, the calculator will perform that.
         public void operations(String buttonCheck)
              currentElement++;
              if(buttonCheck.equals("+"))
                   buttonPressed[currentElement]="+";
              else if(buttonCheck.equals("-"))
                   buttonPressed[currentElement]="-";
              else if(buttonCheck.equals("x"))
                   buttonPressed[currentElement]="x";
              else if(buttonCheck.equals("/"))
                   buttonPressed[currentElement]="/";
              else if(buttonCheck.equals("%"))
                   buttonPressed[currentElement]="%";
              currentElement++;
              numberLength=0;
              userDisplay="0";
              allowDecimal=true;               
         // Method Name: allNumbers()
         // Parameters Passed: ActionEvent variable event
         //     Data Returned: None
         //     Method Purpose: Is run if any of the numbers are pressed. Adds the inputted
         //                         number to the already ongoing number in the display.
         public void allNumbers(ActionEvent event)
              if(checkInt(event.getActionCommand()))
                   if(cEPressed)
                        buttonPressed[currentElement]+=event.getActionCommand();
                        UserInterface.redisplay();
                        userDisplay=event.getActionCommand();
                        cEPressed=false;                         
                        UserInterface.redisplay();
                   else
                        buttonPressed[currentElement]+=event.getActionCommand();
                        userDisplay+=event.getActionCommand();
                        UserInterface.redisplay();
         // Method Name: checkInt()
         // Parameters Passed: String variable dataInput
         //     Data Returned: None
         //     Method Purpose: A quick check to see if the button pressed is a number.
         //                         Rather than doing if(buttonCheck=="1") for every number.
         public boolean checkInt(String dataInput)
              try
                   int n=Integer.parseInt(dataInput);
                   return true;          
              catch (NumberFormatException nfe)
                   return false;
         // Method Name: equals()
         // Parameters Passed: None
         //     Data Returned: None
         //     Method Purpose: Is run if the "=" button is pressed. Takes all the inputted
         //                         numbers and operations and executes all the calculations.
         public void equals()
              double firstNum=0;
              double secondNum=0;
              double currentAns=0;
              int howBig=0;
              for(int i=0; i<buttonPressed.length;i+=2)
                   if(buttonPressed[i]!="")
                        howBig++;
              firstNum=Double.valueOf(buttonPressed[0]).doubleValue();
              for(int j=0; j<=howBig-1; j+=2)
                   secondNum=Double.valueOf(buttonPressed[j+2]).doubleValue();
                   if(buttonPressed[j+1].equals("+"))
                        currentAns=firstNum+secondNum;
                   else if(buttonPressed[j+1].equals("-"))
                        currentAns=firstNum-secondNum;
                   else if(buttonPressed[j+1].equals("x"))
                        currentAns=firstNum*secondNum;
                   else if(buttonPressed[j+1].equals("/"))
                        currentAns=firstNum/secondNum;
                   else if(buttonPressed[j+1].equals("%"))
                        currentAns=firstNum%secondNum;
                   firstNum=currentAns;     
              for(int i=0; i<buttonPressed.length; i++)
                        buttonPressed[i]="";
              buttonPressed[0]=""+currentAns;
              currentElement=0;
              userDisplay=""+currentAns;
              UserInterface.redisplay();
         // Method Name: getInfo()
         // Parameters Passed: None
         //     Data Returned: String variable N/A
         //     Method Purpose: Return the title of this calculation engine.
         public String getInfo()
              return "ver 0.9 Copyright � 2001-2003 Harish.";
    ### Calculator.java ###
    // Date Started: March 1, 2004
    // Date Finished: March 26, 2004
    // Program Description: The main class of a simple calculator.
    public class Calculator
         private CalcEngine engine;
         private UserInterface gui;
         // Method Name: Calculator()
         // Parameters Passed: None
         //     Data Returned: None
         //     Method Purpose: Creates the calculator and displays it on the screen.
         public Calculator()
              engine = new CalcEngine();
              gui = new UserInterface();
         // Method Name: show()
         // Parameters Passed: None
         //     Data Returned: None
         //     Method Purpose: If the window is closed, it will show it again.
         public void show()
              gui.setVisible(true);
         // Method Name: main()
         // Parameters Passed: String variable []args
         //     Data Returned: None
         //     Method Purpose: The main method that runs the Calculator()
         public static void main(String [] args)
              new Calculator();
    -s64

  • OSX/SL 10.6.8 all window apps lose keyboard input; mouse and cmd-N work for spaces

    Input suddenly stops going to all applications, from MacBook Pro and wireless keyboards, and from "Show Keyboard viewer" (OSX 10.6.8 'Snow Leopard', MacBook Pro). Though the OSX Keyboard Viewer shows the keys onscreen as they are pressed on the MacBook and wireless keyboards. 'Spaces' responds to cmd-N commands, but no input is possible to any running or newly-started 3rd party or Apple-provided application. Killing off applications one by one doesn't recover keyboard input ability;  a complete reboot appears necessary to restore the ability to key input into applications. This happens repeatedly, yet never registers as an OS/X 'crash' because 'Force Quit'ting applications and restarting is still possible using only the magic mouse or trackpad.   No data  whether only logging out and back in would correct the apparent input-focus disconnect of all applications with the window manager. There may be some way to restart the window manager by using the mouse to open up new apps and/or cut and paste characters ( including a carriage return ) or cut and paste entire saved typed commands into a terminal window.

    Do a backup, using either Time Machine or a cloning program, to ensure files/data can be recovered. Two backups are better than one.
    Try setting up another admin user account to see if the same problem continues. If Back-to-My Mac is selected in System Preferences, the Guest account will not work. The intent is to see if it is specific to one account or a system wide problem. This account can be deleted later.
    Isolating an issue by using another user account
    If the problem is still there, try booting into the Safe Mode using your normal account.  Disconnect all peripherals except those needed for the test. Shut down the computer and then power it back up after waiting 10 seconds. Immediately after hearing the startup chime, hold down the shift key and continue to hold it until the gray Apple icon and a progress bar appear. The boot up is significantly slower than normal. This will reset some caches, forces a directory check, and disables all startup and login items, among other things. When you reboot normally, the initial reboot may be slower than normal. If the system operates normally, there may be 3rd party applications which are causing a problem. Try deleting/disabling the third party applications after a restart by using the application un-installer. For each disable/delete, you will need to restart if you don't do them all at once.
    Safe Mode - About
    Safe Mode

  • Focus for keyboard input

    I have a VI that, when started, starts another vi that runs in a
    different part of the screen. I want the user to be able to use the
    keyboard and the original VI be the one that receives the keyboard input
    (key navigation, etc.). How do I get the focus back on the original VI
    without "clicking" on it with the mouse?
    -Stephen

    Try using Property Node under Application Control. Set the class to VI.
    Set FP.IsFrontmost to true. Wire the name of the original vi to the Open VI
    Reference function and then wire the output vi reference to the property
    node. This should return keyboard control to the original vi. If you want
    a specific control within the vi to have focus initially, right click on the
    control and create a property node. Select KeyFocus for the property,
    select Change All To Write, and wire true to the property.
    "Stephen" wrote in message
    news:[email protected]..
    > I have a VI that, when started, starts another vi that runs in a
    > different part of the screen. I want the user to be able to use the
    > keyboard and the original VI be the one that receives the key
    board input
    > (key navigation, etc.). How do I get the focus back on the original VI
    > without "clicking" on it with the mouse?
    >
    > -Stephen

  • CS1 for Java (Keyboard Input)

    I downloaded CS1 for my Comp. Sci class in order to use Keyboard input in my Java coding. However, I don't know where to put the downloaded .jar file. Could somebody please help me? This is where I downloaded it from: http://duke.csc.villanova.edu/jss1/bookResources/keyboard.jsp
    Thanks

    Hi Max
    It's not your fault but I am appalled that Java teachers are still using bodges like the Keyboard class, when the standard Scanner class has been available for over 12 months.
    So here's what I suggest:
    1) Try putting the jar file into /Library/Java/Extensions
    2) Tell your tutor to get his notes up to date and use the Scanner class instead of Keyboard
    Bob

  • Reader Closes on any Keyboard input

    Has anyone had this problem?
    Reader closes on any keyboard input.
    Mouse works fine.  And I mean any keyboard action at anytime.
    I have tried uninstalling all adobe reader apps/plugins and reinstalling the latest available version but still Reader closes with any keyboard input.   Make opening password protected PDF's impossible.  The "find" function unusable.
    Any Ideas?

    Are you trying to run your application through TextPad, or some IDE? The System.in is best for command prompt input. Trying running your program through the command prompt, and it should work fine.
    I replicated your error, running your application through TextPad.

  • Photohop CS6 Update to 13.0.2 breaks keyboard input and shortcuts

    Hi,
    I just got the new update to 13.0.2 and after installing it Photoshop doesn't recognize keyboard input as expected? Shortcuts are not working anymore. Input values are not recognized. Text editing not possible anymore. etc.
    And: When I start Photoshop I get the following trial info:
    Master Collection trial. 32767 DAYS REMAINING
    Thats over 89 years –  I can live with that. ;-)
    But there is something wrong with that update, that makes it impossible to continue my work.
    Regards
    PS: Is it possible to uninstall this update or do I have to uninstall Photoshop at all?

    Thank you for the quick answer.
    Sytem Info tells me …
    Optional and third party plug-ins:
       Interpolate CS6 (13.0) ©1993-2012 Adobe Systems Incorporated - from the file “Interpolate.plugin”
       Match Edges CS6 (13.0) ©1993-2012 Adobe Systems Incorporated - from the file “Interpolate.plugin”
    Plug-ins that failed to load: NONE
    Flash:
       Mini Bridge
       Kuler
    Installed TWAIN devices: NONE
    In the meantime I did a system restart and several Photoshop restarts. Finally some weirdness is gone. Trial mode seems to be gone and Photoshop seems to be activated again.
    Two thing left:
    1. I do have a text element, for instance, thats acting weird. The screenshot shows two "Login" text items with exactly the same settings for font and size. But they are displayed differently.
    Easy fix: delete the weirdo and create a new one. But still worth mentioning, I think.
    2. One of my favorite shortcuts is gone. cmd+alt+0 (num pad) to set zoom to 100%
    Easy fix: set the shortcut again via Edit > Keyboard shortcuts …
    Sorry for panicking, but I was really worried to lose the day looking at installers. ;-)

Maybe you are looking for