How to change 'z' key into 'A' key with key blinding?

How to change 'z' key into 'A' key?
Although txt.setText("A") can set the text field with 'a', but it is not original input from keyboard because it cant trigger the key listener.
It is possible to perform key pressing more than a key in same time? Example, perform 'q' & 'w' keys pressing at the same time.
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
public class Main
{   public static void main(String[] args)
    {   JFrame f = new JFrame("Test");
        Test GUI = new Test();
        GUI.setOpaque(true);
        f.setContentPane(GUI);
        f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        f.pack();
        f.setVisible(true);
class Test extends JPanel
{   JTextArea txta = new JTextArea(10,20);
    JTextField txt = new JTextField(10);
    JScrollPane sp_txta = new JScrollPane(txta);
    public Test()
    {   this.setPreferredSize(new Dimension(400,300));
        setLayout(new BorderLayout());
        txta.setEditable(false);
        add(sp_txta, BorderLayout.CENTER);
        add(txt, BorderLayout.PAGE_END);
        Action testAction = new AbstractAction()
        {   public void actionPerformed(ActionEvent ae){ txt.setText("A"); }
        txt.getInputMap().put(KeyStroke.getKeyStroke('z'), "test");    //Change z into A
        txt.getActionMap().put("test", testAction);
        txt.addKeyListener
        (   new KeyListener()
            {   public void keyPressed(KeyEvent e){ txta.append(e.getKeyChar() + " key is pressed \n"); }
                public void keyReleased(KeyEvent e){ txta.append(e.getKeyChar() + " key is released \n"); }
                public void keyTyped(KeyEvent e){ txta.append(e.getKeyChar() + " key is typed \n"); }
}Edited by: 835972 on Feb 11, 2011 8:11 AM

It is possible to perform key pressing more than a key in same time? Example, perform 'q' & 'w' keys pressing at the same time.With r.keyPress method, it only can perform single key pressed at a time. Do you have any idea how to perform multiple key pressed at a time?The javadoc for Robot.keyPress suggests ( "+The key should be released using the keyRelease method+" ) that the key remains "pressed" until you keyRelease(...) it. So, press the keys sequentially:
theRobot.keyPress(KeyEvent.VK_Q);
theRobot.keyPress(KeyEvent.VK_W);
// At this stage both Q and W are pressed "in same time"
... // do stuff
theRobot.keyRelease(KeyEvent.VK_W);
// At this stage, only Q is pressedI suspect that in real life, unless you're a very gifted musician, you don't really press keys "at the same time" (under the time resolution of a keyboard, which I imagine is around a few milliseconds).

Similar Messages

  • How to change language in photoshop CC 2014 with rksskogo into English?

    how to change language in photoshop CC 2014 with rksskogo into English?

    go to your installed photoshop directory select locales folder "nl_NL" folder "support files" "tw10428.dat" rename to "tw10428.dat.old" press yes, and restart the tool again

  • I have just installed Illustrator CS6 yesterday, but I found it was in French. Could help me figure out how to change the language into English?

    I have just installed Illustrator CS6 yesterday, but I found it was in French. Could help me figure out how to change the language into English?
    I got my series number from my Institut (which is in Paris, FR). I do not use Creative Cloud.
    When I was installing the software, I cannot select a language.
    Could you help me with my problem? Do I have to get a different series number?

    lunc,
    You will have to get a new application in English, to replace the French one.
    You, or your Institute will have to get help from Adobe, I am afraid.
    You may try a chat here,
    Get help with orders, refunds, and exchanges (non-CC, chat open between 5AM and 7PM PST/PDT on workdays)
    http://helpx.adobe.com/x-productkb/global/service-b.html
    or (have your Institute) talk to Adobe in France
    http://helpx.adobe.com/adobe-connect/adobe-connect-phone-numbers.html
    If you fail to get any help, please report back here, and I will ask a special forum staff friend to try to find the right one at Adobe to have things sorted out.

  • Hi guys..I am new to this apple ipad apps development .I want to know how to change ipad apps to iphone apps with out changing design and code?can any one tell me?

    Hi guys..I am new to this apple.I have developed  ipad2 apps  . I want to know how to change ipad apps to iphone apps with out changing design and code?can any one tell me?

    You are in the wrong forum. This is a user forum. Try the developers forum.

  • Ibooks 3.1 how to change horizontal scroll into vertical scroll

    update to ibooks 3.1, the scroll mode is changed into horizontal scroll, now in my .epub books it cut so many picture in two parts and display in two pages...how to change , back to vertical mode...

    I find this maybe is the new feature only for books with Asia-Pacific words....english books is right with vertical scrolling mode...but chinese books whit horizontal scrolling mode
    why apple doesn't make a set up to change between this ..

  • How to change Transport request into local object $temp.?

    Hi experts,
    I would like to know to how to change a Transport request into and local object.
    I have already assigned Infopackage to TR, but its not required. We dont want this infopackage to be transported to prod. So how can i change that as a local object.
    Please put our valuable inputs.
    Thanks in advance.
    Regards,
    Dubbu

    Go To that Infopackage ,
    Extras Menu----Object catalog entry.  There you can change package name.
    or
    In SE09---Under the transport requests you can search for the infopackage name and delete from the TR.
    Regards,
    Srikanth
    Edited by: srikanth on Feb 19, 2009 2:26 PM
    Edited by: srikanth on Feb 19, 2009 2:27 PM

  • How to change Error Message into warning message

    Dear Friends,
    I am getting an error
    The qty stored that was entered is adjusted
    Message no. XU 040
    at the time of GRN. I am maintaining batch specific Unit of Measure.
    Please tell me how to change this error message in to a warning message.
    Thanks
    Prashant Atri

    Hello Prashant,
    This is satndard SAP messagge which is maintained in customizing;
    SPRO>>Logistics - General>>Batch Management>>Define Attributes of System Messages
    Here you can convert this messages to warning message. I urge you to please check with abaper as this may be hardcoded message and it may have implications on valuation and posting.
    In the above IMG path you can do the changes
    Br,
    Tushar
    Edited by: Tushar Patankar on Jan 1, 2011 5:36 PM

  • How to Change Open item into Non open item for GL

    Dear All,
                    I have created a GL in FS00 and clicked the open item management for it. 1 entry is posted to that account.Then i have reversed the entry and want to change the Gl from open item to non open item .The message appears as the balance is zero but open item exists.Please suggest how to make it non open
    Moderator: Please, search SDN

    Hi,
    Check the below threads which are useful.
    Open item management status change
    How to change Line item to open item management in G/L transaction?
    Thanks
    Aravind

  • TS3354 HOW TO CHANGE HD MOVIES INTO REGULAR MOVIE

    how to change hd movies on itunes to regular movies

    iTunes automatically syncs HD videos (if they exist in your library) unless you check "Prefer standard definition videos" in the iTunes iPad Summary tab.

  • How to change the image into byte and byte array into image

    now i am developing one project. i want change the image into byte array and then byte array into image.

    FileInputStream is = new FileInputStream(file);
    byte[] result = IOUtils.toByteArray(is);
    with apache common IO lib

  • How to change SID on a SAP System with Maxdb ?

    Hello,
    I've tryed to migrate /clone a productive system from physical to virtual for testing, and it went OK.
    Now, i've done the same to another physical machine and SAP 4.6C r3 goes up,as well as the database MaxDB 7.5 on the new machine.
    but now i have two problems:
    First, the license key: i have to request a new one. i believe that i can do it using https://websmp110.sap-ag.de/licensekey
    Second: the SID is the same, as i have clone the system from one side to another. Same OS, same kernel, etc etc etc.
    In order to achieve the possibility to transform the new cloned system in a DEV system for my SAP landscape, i must rename the <sid> of my SAP.
    I've changed already the SAPSYSTEMNAME = PRD to SAPSYSTEMNAME = DEV, created a new user like "devadm" renamed the directories where i could find "prd" to "dev" and even in the /home/<sid>adm files i've changed everything from PRD to DEV.
    However, this have not worked for me. As that did not worked out, made the "cloning" again. And now i' again with the problem of entering the new license key ( i believe i can request it via that webpage mention above) and changing the <sid> of the system.
    Is there any sap not where i can see how to change the <sid> / SAPSYSTEMNAME ?
    Thank you
    my system is a RHEL5 with MaxDB 7.5 64 bits
    Filipe

    Hi Filipe,
    afaik the SID of a SAP instance cannot be changed later on.
    But this is not a db-topic - so you're basically asking the wrong people here in the forum.
    Perhabs is more suited for this question.
    Concerning the licensekey : yes, you will need a new one if you change the hardware or db platform.
    KR Lars

  • HOW TO CHANGE A PAGE THAT AUTOMATICALLY OPENS WITH A NEW TAB?

    whenever i open a tab a web page opens which is not my home page how to change it?

    There are lots of people who think you want something other than a blank page for a new tab. It would be helpful if you could give a url or describe the hi-jacking page that appears instead. It is probably an extension. Does the problem occur in "Safe Mode" which you can test out via
    * Alt+H (Help) > Restart with Add-ons disabled...
    type about:config into the location bar then filter on the url that you see

  • How to change recon.account directly in Table with out changing customizing

    Hi Gurus,
    I want to change Customer reconciliation account but this is not possible any more due to display option for reconciliation account in customizing.
    I know I can change customizing and then change the reconciliation account, but there is a better way doing this.
    We can change this directly in the table without changing customizing, but I don't know how to do this. Does any one know how to change directly in the table?
    Many thanks in advance

    Hi there,
    The steps that you should take include:
    1. go to SE16
    2. put knb1
    3. on the field selection input the customer you want to edit
    4. Execute
    5. type to the transaction field /h and press Enter
    6. double click to the customer line item you want to change the recon
    7. this will navigate you to the debug environment
    8. on the debug environment press find/search button -or- CTRL+F to find a keyword code
    9. you should see  if code = 'SHOW'.
    10. now please double click on the word "code" to set the Breakpoint
    11. Press F7
    12. you will see the program routine will stop at if code = 'SHOW'.
    13. Double click on the word 'code'
    14. 'code' will appear on the righ hand side with value = 'SHOW'
    15. change the value of 'SHOW' to 'EDIT' by double clicking the Edit icon (pencil) and replacing the value of SHOW to EDIT
    16. press Enter
    17. press F8
    18. you can now change the recon field
    19. Press SAVE button
    20. Double click 2x (or more) on the STOP sign, until your breakpoint is gone
    21. press F8 and you should see the message of "Database Record successfully created"
    Good luck!
    Regards,
    Fausto
    Edited by: Fausto Jahja on Jul 21, 2009 5:26 PM
    Edited by: Fausto Jahja on Jul 21, 2009 5:50 PM

  • How to change the source type for a primary key on a form?

    Hi,
    At the time of creating a form, I had set the source type for the primary key to an existing sequence.
    Now I want to change the source to a trigger.
    Can anyone suggest how to do it?
    Thanks in advance,
    Annie

    Annie:
    Define the trigger and then delete the page process named 'Get PK'
    Varad

  • How to change color or boldness of iOS 7 key pad

    When are we getting the update to change keyboard boldness not the message we read or send? Apple really dropped the ball on this one !!! Did they forget that they're  a 30 and over market ... I for one am tired of the eye strain and head aches

    I found an answer, as I had the same issue.  And of course, like many things Apple, it's fairly simple.
    The issue arises when you have Touch ID enabled.  Once you disable Touch ID, you will then have choices of longer periods before a passcode is required.  Of course then you don't have Touch ID, but mine rarely works anyway.  My skin is too dry and it fails constantly.
    There is a good explanation here: http://danstillman.com/2013/09/30/touch-id-and-require-passcode-immediately

  • Bringing Premiere ultra keyed footage into after effects with key intact

    It there a way to bring in footage I keyed using Premiere ultra into After effects? I much prefer the ultra keyer over anything native to After Effects CS5.5. If not, how do I export and keep intact the aplha channels from the keyed footage into after effects? Thirdly, if I have to, how do I remiove the black background I get as a result of a default quick time movie file?

    You can not export a clip with alpha from PPRO.
    Easiest way is just doing the key in Keylight - AEFX ( which is far more powerful and flexible than Ultra Key . As good as it is, it has its limits)

Maybe you are looking for

  • Passing data from one bsp application to another

    Hi, I have few queries that most of you would have done in ur projects: 1. I want to pass data from one bsp application to another: eg based upon selected row of table view which populates material no and descriprion to another application which open

  • Photos to be displayed in ALV

    Hi, I have to display n no. of photos in ALV. All photos are there in Archive. How to get those photos from Archive link and how to display it in a ALV. Plz help me to cameout from this issue. Thanks in Advance, Vimal

  • AS3 loading large dynamic XML

    Hi! I have dynamic XML file written in PHP, that I'm loading into the Flash. (http://twittersiena.lv/content.php) There are two problems      - Loading takes too long time. Maybe there are some workarounds to make it load at least a bit faster. There

  • Removing photos from screensaver menu....?

    On the MacBook Pro Screensaver menu I was able to put photos from iphoto, but then i decided to change the picture later. Is there a way to delete all of those excess pictures off of the screensaver/desktop menu under settings and preferences that I

  • Why can't i view my pictures?

    everytime i take a picture it doesn't save, and i cannot view my pictures. what is going on?