Mainstage shows keyboard input, no audio

The program shows midi input from my USB keyboard, but the screen keys don't suppress and no sound comes out. The audio is there when I mouse the screen keyboard.
simple beginner's question, but difficult to find how to assign the midi keyboard to the concert.
RT

Go to layout mode(command>1) and select the keyboard screen control. In the upper left hand corner you'll find the screen control inspector. Assign your keyboard here, either by selecting "assign" or manually selecting it in the MIDI port box. Do the same for pedals attached to the keyboard.

Similar Messages

  • Spaces locks keyboard input

    Per Sean Dale1, the following was mis-posted in the 10.5 Leopard thread (original post here: http://discussions.apple.com/thread.jspa?threadID=2201088):
    Have been running into this problem more and more frequently on both a MacBook Pro and Mac Pro tower running 10.6.1 and 10.6.2: when I Control-right-arrow to move to my other "space" one or two of two bad things will happen:
    (1) the icon in the middle-bottom of the screen showing which "space" I'm in does NOT fade away and disappear
    (2) I am prevented from doing ANY keyboard-input into my programs there. I will be able to click and highlight windows using the mouse, as well as see menus activating and such, but anywhere there is a text field (browser or address book or ANYwhere) keyboard input is not displayed.
    The only solution is to go into the Activity Monitor and quit the Dock application.
    Have been seeing this problem for a few weeks which persists through reboots and such.
    Ideas?

    This issue is being covered in more detail at this thread:
    http://discussions.apple.com/thread.jspa?threadID=2161076
    This suddenly started happening to me yesterday and now happens every time I switch Spaces with the keyboard. I've found that the only way around it is to only use the menubar icon to switch. Because I'm so used to clicking keys to switch Spaces and still do it unconsciously, I've disabled the keys in Spaces prefs.

  • Maple13, tiling wm and keyboard input

    Hi,
    I am using a tiling wm (musca). I installed maple and at first had the problem, that maple would show only a grey window.
    Using wmname and
    wmname LG3D
    I resolved the problem. Now the problem is, that the worksheets wont accept my keyboard input.
    Mouse/menus work. All dialogs also work with keyboard input.
    If I open a new worksheet, input works. But as soon as I switch worksheet it does not work anymore.
    Anyone an Idea what I could do?
    Thanks!
    PS: I already tried sun jre (from pacman) and openjdk6 by changing the maple startup file. It's always the same

    Depending in your window manager you may have the option to add a floating workspace. Try working there. If that doesn't solve the problem you can try runing an aditional floating window manager inside a Xnest or a Xephyr session. This has worked for me for some other problematic applications. For example try:
    Xephyr -ac -br -host-cursor -noreset -screen 1280x800 :1 &
    sleep 3
    twm -display :1
    this will initiate a new X session inside yours, which will be managed by twm. There you can run a terminal and of course maple. Maybe is a sub optimal workaround, but is the only alternative I have found.
    (Note that Xephyr is found in xorg-server-xephyr package and twm, well in xorg-twm )

  • Can't get computer to show volume input/output controls, Can't get computer to show volume input/output controls

    Can't get computer to show volume input/output controls, Can't get computer to show volume input/output controls

    How, what, why, where, when!
    This is the Logic Pro forum.
    We're going to need more information if this is in regards to using Logic Pro.
    Computer model & year, audio interface, Logic Pro version..etc..etc

  • Multiple Keyboard inputs...

    I've finished up a version of Pong for extra credit for a Java class i am taking, and i ran into an interesting situation.
    I cannot figure out how to have a two player version of pong have both players control their paddles with the keyboard. The specific problem i run into is, when i enter one paddle to move, and the other attempts to move it stops the first paddle from moving, also there is the whole issue of the key delay that occurs when a key is held down. If anybody can help me out, i would be incredibly greatful.
    It seems like it could possibly being done, for example, in games ive played before a character has been able in mid run(holding arrow key) press another key(such as shift) and jump into the air, while still running, to perform a run-jump.
    I have tryed setting up a keyboard input test so if both keys are pressed both paddles move. This works for one movement, but have you ever tryed hitting two keys at once in word? they both will display once, their will be that short delay, then one of the two keys will continously repeat.
    Any advice? I have it working with one Keyboard input, and the other Mouse input, but the mouse clearly has a big advantage over the keyboard player...
    Thanks,
    Sean Green

    and the repeated key thing still happens as well as the delay....I guess you'll get this as long as you use keyTyped() for player1. Is
    there some reason why you're doing this?
    What I was thinking of was along these lines:boolean up1, up2, down1, down2;
    keyPressedHandler()
        if key is w up1=true
        if key is s down1=true
        if key is up, up2=true
        etc
    keyReleasedHandler()
        if key is w up1=false
        etc
    drawingCodeOrWhereever()
        if(up1 && !down1) player 1 is on the way up
        (else) if(down1 && !up1) player 1 is on the way down
        if(up2 && !down2) player 2 is on the way up
        (else) if(down2 && !up2) player 2 is on the way downYou may want to handle the case of up and down both pressed
    differently.
    If getting rid of keyTyped() doesn't help, post some code. An example
    simple enough to just show the problem woule be good. Say how
    you would make a dot move left-right and up-down indepently.

  • PPC apps (on intel): slow startup, no keyboard input, Excel-Office crashes

    Hello,
    It seems, that all apps that are using rosetta don't work properly.
    - The startup time is extremely long, some minutes, spinning wheel is visible
    - input via keyboard isn't possible
    - Office v. X (Word, Excel, PowerPoint) apps are crashing at startup
    A test with the Calculator.app switched to open with rosetta showed also this symptoms (no keyboard input possible)
    Curiously all this happens *only with my account*. So first I thought it is a problem of the preferences or fonts. But deletion or substitution from backup does not succeed. Also I did the tip sudo "update_prebinding -root / -force" but it didn't help.
    I mad up a fresh account and compared all the files in the ~user/Library path, if there is a file missing in the brocken account. But didn't found some.
    Is there anywhere a file outside the ~user/library path, which has user dependend informations (for rosetta)?
    Many thanks in advance for any idea
    George

    Yeah, I've got it!
    In /Library/Caches I found the following files and trashed them. Now all PowerPC application incl. Office v. X are working again. Huh!
    (My User ID is 504)
    com.apple.ImageCaptureExtension2.ICADeviceDatabase.504
    com.apple.IntlDataCache.sbdl.504
    com.apple.IntlDataCache.504
    com.apple.IntlDataCache.tecx.504
    com.apple.IntlDataCache.kbdx.504
    com.apple.LaunchServices-014504.csstore
    com.apple.IntlDataCache.le.504
    com.apple.colorsync.profiles.504
    com.apple.IntlDataCache.le.kbdx.504
    com.apple.dock.iconcache.504
    com.apple.IntlDataCache.le.sbdl.504
    com.apple.psnormalizer.fontcache.le.504
    com.apple.IntlDataCache.le.taid.504
    com.apple.psnormalizer.fontcache.le.504.lock
    com.apple.IntlDataCache.le.tecx.504
    I didn't look for the single fault in any of this files, but maybe someone has an idea, which file is related to rosetta and likes to post it.
    Best regards and thanks to everybody who thoughts about a solution for my problem
    George

  • 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

  • Show Keyboard & Character Viewers setting not working

    I like to have access to the Keyboard and Character Viewers in the menu bar; however, the setting on my new MacBook does not work. I have checked the "Show Keyboard & Character Viewers in menu bar" many times and it unchecks itself as soon as I leave the Keyboard tab of the Keyboard setttings in System Preferences.
    Could a preference file be corrupted? (I migrated data from my old MacBook (OS 10.7) to my new MacBook (10.9). Perhaps this has something to do with the problem?)
    Or, is there a command line way to show the preference that might stick better than the checkbox in the System Preferences?
    Any insights would be appreciated.
    Thanks,
    -Robert.

    BikerBob wrote:
    The Input Sources menu has to be enabled to show the Keyboard & Character Views menu, which appears under the Input Sources menu. This was not the case in Mac OS 10.7, which I was previously using.
    However, it is odd that the Keyboard & Character Views option is not greyed out in the Keyboard tab when the Input Sources menu is not enabled.
    Indeed, the way Apple has done this in Mavericks seems both odd and cumbersome.   I think it would be worth telling them so at
    http://www.apple.com/feedback
    The official instructions assume you have already enabled the input sources menu:
    http://support.apple.com/kb/PH13746

  • 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. ;-)

  • Kazakh keyboard input not works

    Hi.
    I'm can't figure out trouble with kazakh(cyrillic) input to text controls in Flex4.
    I'm embedded unicode fonts, and "Copy->Paste" kazakh text from notepad into flash app works fine!
    But i need to keyboard input. In my case ordinar cyrillic letters inputs normal, but kazakh-specific
    letters (located in keyboard's 1234 and 7890 keys) not works - ? symbol displays.
    Please, anyone help me. I'm wasting 2 weeks in attempt to resolve it.
    P.S: FlexSDK 4.0.0.12321, FP 10.0.42.34, OS Windows.

    When you paste and it works, take the string and look at the charCodeAt() for each character in the string.
    Then when you type, see if the keyDown event is reporting the same charCode or not.
    Another test is to verify that your browser can allow those characters when typed into an HTML INPUT tag.
    Hi!
    When i'm pasting kazakh letters into textInput, flexApp shows correct charCodes, e.g.:
    әіңғүұқөһ -> 1241 1110 1187 1171 1199 1201 1179 1257 1211
    but when i'm typing this letters from keyboard, flex shows these charCodes:
    ?і??????? -> 63 1110 63 63 63 63 63 63 63
    (cyrillic-kazakh letters located in place of 2,3,4,5,8,9,0,-,= symbols of keyboard, on simple click - lowercase, with ShiftKey - uppercase).
    testing app code:
    <?xml version="1.0" encoding="utf-8"?>
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
                   xmlns:s="library://ns.adobe.com/flex/spark"
                   xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600">
        <fx:Script>
            <![CDATA[
                import mx.controls.Alert;
                protected function richeditabletext1_keyDownHandler(event:KeyboardEvent):void
                protected function rt1_keyUpHandler(event:KeyboardEvent):void
                    ttt.text = "";               
                    for (var i:uint = 0; i<rt1.text.length; i++){
                        ttt.text = ttt.text+" "+ rt1.text.charCodeAt(i);
            ]]>
        </fx:Script>
        <fx:Style>
            @namespace s "library://ns.adobe.com/flex/spark";
            @namespace mx "library://ns.adobe.com/flex/mx";
            @font-face {
                src: url("arialuni.ttf"); /* Embed from file */
                fontFamily:"Thai_font";            
                /*unicodeRange:"Cyrillic";*/
                unicodeRange: U+0400-04F9;
                cff-hinting:none;
                embeddAsCFF:true;
            .test{
                font-family:Thai_font;
        </fx:Style>
        <s:TextInput id="ttt" width="100%" fontFamily="Arial Unicode MS"/>
        <s:TextInput id="rt1" x="562" y="243" text="RichEditableText" width="100%" height="500" enabled="true"
                            editable="true"  fontSize="18" keyDown="richeditabletext1_keyDownHandler(event)"
                            keyUp="rt1_keyUpHandler(event)"
                            direction="ltr"
                            styleName="test"/>
    </s:Application>

  • The red colored "record ready" button has disappeared  from my track header area. The other four buttons are showing fine, (input (i), hide (h), mute (m) and solo (s).

    The red colored "record ready" button has disappeared  from my track header area.
    The other four buttons are showing fine, (input (i), hide (h), mute (m) and solo (s).
    Can anyone help me with this?
    Thanks
    Johnny

    Ahrenshof: Thank you for your suggestion:
    ((preferences>audio>devices  (re-select your input source) ))
    I already had that done IE. I had duet already chosen as input and output etc etc.
    The problem seemed to be the issue that was addressed by Eriksimon:
    (( ctrl-click the track Header.))
    Following that advice gave me a drop down menu which allowed the various buttons to be
    checked and unchecked.
    Thanks so much for taking the time out to
    help with my problem. It seems to me that
    this formum is far better equipped to handle
    user's problems than any or the options that
    are available on the acual Logic help menu.
    It appears that Logic has been put
    together by techies who, (though they
    may be brilliant at computer software issues), then have
    virtually no skill or imagination with regards explaining
    how to use it, to the actual users.
    I have a PhD in Egyptology. I mention this not
    because I think it a particularly brilliant acheivement
    but just to indicate that I am not a total dummy.
    More to the point I find using Logic needlessly tiresome
    and the explanations that are given in the "Help" menu
    are nothing short of tragic. Perhaps Apple could start to give
    out free ropes or razor blades to everyone who buys the program.
    Not to say it is not much better that the other junk out there, it is,
    the sorry fact is that that is not saying much at all.
    I send sincere thanks to all the users out there who support
    each other through this forum. johnnyloonybin

  • Consume keyboard input

    I am looking for a way to put my gui application in a "wait state." What this entails is that the mouse cursor shows an hourglass and mouse clicks are ignored. Also, any keyboard activity is ignored as well. The reason for this functionality is that there are times that my program needs to perform cpu intensive work and I would like the user to wait until the work is complete before the gui becomes responsive again.
    Now, I figured out how to ignore the input from the mouse by using adding a mouse listener to the GlassPane of the gui's JFrame and setting the GlassPane visible. But I can't find a way to use the GlassPane as a "buffer" between the user's keyboard input and the gui. The only alternative that I have found is to add a KeyListener to every component that can receive keyboard input but I would rather not have to manually add a new listener to every single button, textfield, and table that I might have added to the frame. Is there an elegant solution to ignoring or consuming all keyboard activity on a frame that is already set visible? Thanks for your responses.

    You know, if I read the entire message of the OP, I wouldn't look quite so dumb!
    Take a look at the following. It will block and unblock keyboard input.
    public class DispatchTest
        KeyEventDispatcher blocker = null;
        public JPanel buildPanel()
            JPanel p = new JPanel(new FlowLayout());
            p.add(new JTextField(20));
            return p;
        public void blockInput()
            if (blocker == null)
                blocker = new KeyEventDispatcher()
                    public boolean dispatchKeyEvent(KeyEvent e)
                       e.consume();
                        return true;
            KeyboardFocusManager.getCurrentKeyboardFocusManager().addKeyEventDispatcher(blocker);
        public void unblockInput()
            if (blocker != null)
                KeyboardFocusManager.getCurrentKeyboardFocusManager().removeKeyEventDispatcher(blocker);
        public static void main(String[] x)
            JFrame f = new JFrame();
            DispatchTest t = new DispatchTest();
            f.setContentPane(t.buildPanel());
            t.blockInput();
            f.pack();
            f.setVisible(true);
    }Message was edited by:
    ipooley

  • Alternative ASCII characters for standard keyboard input using TextEdit?

    Hi, how can slight variations to characters be made on the fly while typing in TextEdit? For example, using Option + O I'm able to type "Ø"...how can I type other "variations" of O...with accents, umlauts, etc? thanks

    Choose Show Keyboard Viewer from the menu with the flag icon. If it doesn't appear, open the International pane of System Preferences to enable it and the input menu.
    (48307)

  • 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

  • Keyboard input changed to wrong language

    I'm using a dual g5 desktop running tiger 10.4.4. This morning all keyboard input is in the wrong language. It's greek or one of the symbol fonts. According to the setings in the international panel everything should be set to US English, roman script. I know that CMD+space used to toggle between input choices but that now brings up Spotlight. Is another key combination that toggles the languages? Other settings to check? It's interesting that the input menu tab of the international pane still says use CMD+space to toggle inputs, but that no longer works.
    Help? thanks

    According to the setings in the international panel
    everything should be set to US English, roman
    script.
    The setting that matters is system preferences/international/input menu (not languages). Also make sure you have the box checked for "show input menu in finder," so you can see what keyboard layout is active in the "flag" menu at the top right of the Finder.

Maybe you are looking for

  • [SOLVED] No sound in Gnome 3 after upgrade

    Hi, After last upgrade, I have no sound in Gnome 3. I think all modules are loading: lsmod| grep snd snd_hda_codec_conexant 47158 1 snd_hda_intel 25700 4 snd_hda_codec 97432 2 snd_hda_codec_conexant,snd_hda_intel snd_hwdep 6300 1 snd_hda_codec snd_pc

  • Can't print to HP Officejet 6600 since last update yesterday. how do i fix?

    Hi there, It looks like other people are having similar problems since installing the latest update. I have to get my printer working. I have a big grant due and I need to print today. Anyone can walk me through fixing this? Or has Apple released a f

  • Retrieve workflow container data in programming exit

    I am trying to use a programming exit in Workflow in order to amend the task container for the receipients field of a "Send Email" step. The reason why we are not determining the receipients in the usual way is because we hold the receipients (amongs

  • Multiple substitution Variable in Data Forms

    Hi, i have a problem with the creation of a hyperion Planning Data Form. I have created a Substituion Variable with "three" values delimited with a comma. I note that it works fine in the calculation script but i've a problem during the creation of a

  • How Do I Convert at Palette Into a Color Ramp?

    Hello, Is there a way to convert the 5-color palettes created by Kuler into a continuous color ramp? Thanks, Doug Twitter: @dugla