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

Similar Messages

  • TS3280 How can i enable both paired bluetooth and ios keyboard input at the same time?

    How can i enable both paired bluetooth and ios keyboard input at the same time?
    This is needed for the app im working on. Need some user input via keypad as well as scanner input via a paired bluetooth scanner.

    You probably should not be using a keyboard bluetooth profile for a scanner, I am not a developer for apple so do not know the location for you to find out the correct profile you should be using for an input device that is not a keyboard. Sorry,
    I am sure if you navigate the apple developer site you will probaly finmd what you're looking for.
    https://developer.apple.com

  • I have a new mac book pro (sept 2014) and am suddenly stuck on the log-in screen. Keyboard input not working to enter my password. Already tried a basic restart and a cmmnd/ cntrl/ pwr troubleshoot to no effect.

    I have a new mac book pro (sept 2014) and am suddenly stuck on the log-in screen. Keyboard input is not working to enter my password. Seems to be a log in issue as keyboard works for forced troubleshooting. (And b/c when I first noticed the problem, I was able to enter my log in password but then everything sort of froze. Now, no ability to enter the password.) Already tried a basic restart and a cmmnd/ cntrl/ pwr troubleshoot to no effect.

    Reset PRAM:   http://support.apple.com/kb/PH14222
    Start up in Safe Mode.
    http://support.apple.com/kb/ph14204
    A new Mac is in warranty for 1 year from the date of purchase.
    A new Mac comes with 90 days of free tech support from AppleCare.
    AppleCare: 1-800-275-2273
    Call AppleCare or take it to the Apple store to have it checked out.
    Genius Bar reservation
    http://www.apple.com/retail/geniusbar/
    Best.

  • How to have same keyboards input source in Mac and Windows???

    I use Canadian French-CSA on my Mac keyboards input source. Using Windows 7, I can't find the good setting for my keyboards to be the same when I it keys.
    I run Windows over Parallels Desktop
    Can anybody help?
    Thank you

    Can I use an AirPort Extreme Base Station "n"
    Yes.
    and if so, will my MacBook work with this at maximum download / upload speed (i.e. equivalent to the cable)
    The speed of your internal network generally is much much faster than the speed of your internet connection. Unless he has an internet connection faster than approx 6Mbps then even dropping down to the old 802.11b Airport would not seen any decrease in speed of downloads etc...
    and will my brother's PC's also be able to connect?
    If his PC is 802.11b/g-compliant, it shouldn't have any problems connecting to the AirPort base station.
    Or is there another Airport base station?
    The other AirPorts would work, but the AirPort Express & older 802.11g AirPort Extreme base stations have a max. range of 150 feet.
    OR-- should I head down to "Generic Computer Store" and just by a wireless router (WiFi)(think that's what they call them) and connect this to his cable modem? IF SO WILL THAT WORK FOR MY MAC?
    That is always an option as well, especially since he will be the primary user throughout the year. I'd suggest going with a brand name, like Belkin, D-Link, or Linksys for the wireless router choice.

  • How to use the phone's Mini-Keyboard Input with the 'Textbox'(MIDP2.0)?

    (My apology. My English is not perfect but I'll try my best. >_<)
    Hi. I'm trying to create a textbox(in my own little application) that is compatible with the mini-keyboard input feature.
    This problem involved any device that have a built-in "mini-keyboard".
    Problem:
    I tried the 'Textbox' class from MIDP2.0 but the result, as expected, is like using the phones with no built-in keyboard.
    (Forexample if I want to input the character 'C' inthe text box, I need to press number '2' button three times to let it circle through 'A' -> 'B' then 'C'. )
    Then I tried entering URLs in the phone's built-in web browser, the result is I can use the mini keyboard to type like a PC keyboard.
    Question: How do I implement such textbox that is fully compatible with the built-in mini Keyboard?
    I tried browsing through the MIDP2.0 API but it seems the 'Textbox' class there couldn't do it.
    Thank you. =)
    /bow
    Edit/Delete Message

    The textbox should have input just as any other normal phone input. If not, something strange is going on.
    Anyway , there is no use to make your own input method, since every phone has another implementation of this anyway. It would only confuse users.

  • Firefox and Thunderbird are suddenly not accepting keyboard input

    Keyboard shortcuts still work just input in any kind of input field fails so I can still use ctrl+C / CTRL+V to somewhat use firefox and Thunderbird But all input fields are completely unresponsive to keyboard input
    The problem suddenly arose while I was browsing.
    I have the same issue on all program's based on the Gecko engine and I confirmed them so far in Firefox, waterfox, instantbird, thunderbird and fossamail. However chromium / windows / basically everythign n
    To fix it I tried the following:
    Restarting firefox
    Restarting firefox in savemode
    Rebooting
    Changing the keyboard layout in windows
    Using a different keyboard
    Again rebooting
    Pressing F7 to check for caret mode which was disabled
    pressing winkey + F9 (Whatever that does)
    I am running windows 8.1(x64)

    Solved, Changing the keyboard layout again and rebooting fixed it. I tried using the on screen keyboard which worked so I changed the keyboard layout again and rebooted and now it works just fine. I still wonder what caused a Gecko wide issue like this?

  • Default Keyboard input change in using roaming Profile on different Win 7

    We found a strange problem on default Keyboard setting.
    We are using roaming profiles for all users.
    One of our users is using two Windows 7. One Windows 7 is VDI for working out of office and another Win 7 is her local PC.
    She is only using Two keyboard input: Chinese Traditional English and Chinese Traditional Pinyin.
    Whenever she had used the Windows 7 VDI, when she comes back to office and use her local PC, the default Keyboard input will automatically change to Chinese Traditional Pinyin.
    The user said she had not changed any default keyboard input in the VDI of local PC.
    Is there anything we can do for this issue?
    Ivan

    Hi Ivan,
    I am just writing to check the status of this thread. Was the information provided in previous reply
    helpful to you?
    Do you have any further questions or concerns? Please feel free to let us know.
    If you have any feedback on our support, please click
    here
    Karen Hu
    TechNet Community Support

  • CS3 Language Keyboard Input Error

    Greetings All,
    I have been trouble-shooting this problem for a while, but still it is not resolved. Any help or ideas would be gladly received!
    Background: We have a correctly functioning installation of Win XP, and PS CS3 Extended which appears to work normally in every other regard. No obvious errors; no crashes, no start-up complaints; nothing seemingly out of order. I use several installed languages in Windows (EngUK, Russian, Swedish, etc). All of these work normally. All of my installed fonts work correctly in every application on the system except for CS3.
    There would appear to be something wrong with CS3's keyboard mapping in foreign languages. When typing with a non-English keyboard setting (any other language) and using TrueType fonts (not Open), only 'missing character' boxes appear in the artwork. The Layers menu displays the typed text correctly, but this will not appear in the artwork. If I use an old install of PS7, I can type using these same fonts correctly in any language. These layers can be imported into CS3, and these WILL display correctly on the artwork. However, the Layers menu in this case displays nonsensical characters. Ergo, I suspect that CS3's keyboard input data is errant.
    Where does PS3 keep its information regarding language / keyboard layout? It is possible to edit this file(s)? Are there any other ideas regarding this problem and what might be wrong?
    Thanks

    Unicode vs. non-Unicode. Turn off glyph substition in the character palette.
    Mylenium

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

  • Setting keyboard input to default to phone

    Trying to figure out how to set my keyboard input to default to the phone, NOT to search or any other text-based input. I want to be able to type a phone number into my phone and call someone. Is this too much to ask? I have spent hours trying to figure this out and can't find an answer. Help please! And thanks.

    I don't think so, that I know of.
    Are most of your calls all dialed by number or are there a few numbers you dial quite often?
    You can set a screen shortcut to those.
    1. If any post helps you please click the below the post(s) that helped you.
    2. Please resolve your thread by marking the post "Solution?" which solved it for you!
    3. Install free BlackBerry Protect today for backups of contacts and data.
    4. Guide to Unlocking your BlackBerry & Unlock Codes
    Join our BBM Channels (Beta)
    BlackBerry Support Forums Channel
    PIN: C0001B7B4   Display/Scan Bar Code
    Knowledge Base Updates
    PIN: C0005A9AA   Display/Scan Bar Code

  • Installed rdesktop - but keyboard input still goes to Mac Terminal??

    My work PC has been "upgraded" to Windows 7 which made the Microsoft Remote Desktop Connection v2.0.1 stop working (it connects OK, I can login and see my work PC screen, but as soon as I try to do something I am "disconnected" from the PC).  I can't install RDC 2.1 because I have a PPC G5.
    So I searched for alternative remote desktop apps.  Cord 0.5.0 crashes on my machine and 0.5.5 won't even start up.
    I ended up installing rdesktop (www.rdesktop.org)
    It looks promising - very fast, and gets me to my PC login screen.  My mouse pointer can click on the screen buttons, but any keyboard input appears in my G5 Terminal window and is not sent to the Windows 7 PC.  This makes it impossible to enter my Windows 7 password to login!
    I'm sure this is a simple problem to solve but I have no idea on how to solve it.
    Any clues appreciated.  Thanks.

    Try:
    rdesktop -x m -r clipboard:"CLIPBOARD" -g 1280x1024 -u<username> <hostip>
    I do recommend using ssh tunnel for RDP over internet. Is more secure and limits open ports to only ssh port in firewall.
    There are instructions about on how to use cygwin with RSA key login, turn off ssh password login when working properly.

  • Take printscreen and detect mouse/keyboard input

    hi guys,
    I'm looking a way to take printsceen and detecting mouse/keyboard input in Adobe Air app using html/ajax .. is it possible ?
    any ideas ..please

    I wrote a blog post on how to do screen capturing using Adobe AIR abnd HTML/JavaScript. Maybe it'll help you out:
    http://www.andymatthews.net/read/2009/11/05/Capture-BitmapData-with-JavaScript-AIR-applica tions
    As for detecting key input, you can add a keydown/keydown event to the document quite easily.
    document.addEventListener('keydown', function(evt){
         // do something

  • Troubleshoot keyboard input problem

    the right hand shift key, and full stop, have stopped working. When I attached a different apple keyboard the same thing happened to it. The only way I can get a full stop is with the numeric pad, and the only way to get shift is with the left hand shift key. Does anyone have a solution, please?

    Well, the game is a bit big now, but the problem is definitely in the file GameBoard.java, and my source is:
    http://userpages.umbc.edu/~cbutle3/space.zip
    It is simply a Space Invaders Game. I have gotten almost everything working but keyboard input. I have it set up now so that the game even plays itself, cuz it doesn't listen to my button presses :)
    I really want to add a KeyListener to the JPanel (the GameBoard extends JPanel) so that keyboard input is invisible, but it won't let me - says the GameBoard never has focus and just ignores it. So to get any key input to work at all, I temporarily added a TextField to the panel, and added the KeyListener to the TextField. That's part of the problem. And the main problem is that inside the "gameplay" loop, the KeyListener has no effect. I tried making a new class with a run(), putting the KeyListener in there and calling start() from the GameBoard, but it had the same outcome. Please help! :)
    -chris

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

  • Keyboard Input OS X 10.9

    A student changed the MacBook keyboard input to a foreign country keyboard.  It is changed at the log in screen too.  I can't figure out how to change it back.  I can use an external keyboard and log on and type and I have no problems. I just can't use the keyboard on the laptop.  This MacBook is using OS X 10.9.

    Hey Sweet 1971,
    Well let’s see if we can get the keyboard back to what you need. If you can log in to the account, go to System Preferences > Keyboard and go to the Input Sources tab and remove any keyboard that you do not want and you should be good to go. I have also provided an article on how to change the keyboard layout at the log in window and it talks about OS X Lion but will be the same for OS X Yosemite. 
    OS X Mavericks: Use input sources to type in other languages
    http://support.apple.com/kb/PH13835
    OS X: How to change the keyboard layout at the login window
    http://support.apple.com/en-us/HT202038
    Take care,
    -Norm G.  

  • Solaris 10 8/07 Install hangs awaiting keyboard input

    I have a W2100z Java Workstation that I am trying to install S10 8/07 on. When it first powers up, I get the standard bios prompts and can hit F2/F8 to customize things as I wish.
    However, when I start the Solaris install from CD, after the OS installer is loaded, it first prompts for 1, 2, 3, 4, ... choices (1 being an interactive install). No amount of keyboard punching seemed to get it to make a choice. So after about 30 seconds or so, it times out and presumes interactive install.
    After a bit, it loads a text-based window to let me choose a language. Just move the cursor around, select a language, and then hit F2 to continue. Unfortunately, it does not recognize any keyboard input and just sits there comatose for as long as I choose to wait.
    So, perhaps I have a keyboard issue, so I swapped out a Kensington for a Dell keyboard. That didn't work so I acquired a Sun keyboard. That doesn't work either. I've also plugged the keyboard into every USB slot I could find (two on the front and 3 on the back), all to no avail.
    Now, Solaris 11 from the SXDE has no problem booting and installing on this computer with all of those keyboards. Unfortunately, that is academic in that I need to run S10.
    So what is the magic to getting the W2100z to boot/install Solaris 10?

    After much gnashing of teeth and pulling of hair, I found an BIOS upgrade for the W2100z. The keyboard now is recognized and the bits are installing.

Maybe you are looking for