CTRL + any other chracter

In the following simple swing test case,
import java.awt.event.KeyEvent;
import java.awt.event.KeyListener;
import javax.swing.JFrame;
import javax.swing.JTextField;
public class MySwingDemo extends JFrame implements KeyListener
public MySwingDemo()
super ("A Demo");
JTextField field = new JTextField("Key Press Trial is here");
field.addKeyListener(this);
this.getContentPane().add(field);
this.pack();
this.setVisible(true);
public static void main(String str[])
new MySwingDemo();
public void keyPressed(KeyEvent ke)
System.out.println("The key Char is : '"+ke.getKeyChar() + "'");
System.out.println("The key Code is : " + ke.getKeyCode());
public void keyTyped(KeyEvent ke)
public void keyReleased(KeyEvent ke)
I find that for KeyPressed Event :
If I press CTRL + any chracter (i.e. something like 'Ctrl' + 's') than getKeyChar does not return the character corresponding to the pressed key ( i.e. 's' in this case ) but returns some invalid chracter (some rectangle),
but getKeyCode() does return the ascii code for 'S' i.e. 83.
I really don't understand if getKeyCode() returns a correct ASCII value than why should getKeyChar() not return the correct character.
So is this a default awt behavior, if it is so than why it is (is this seems to be a awt bug?)
I would like to know if any of you can help me locate a reason for this behavior.
Thanks for your ideas.
Thanks
Sanjeev

Thanks for your reply, but still I have a query regarding MAC behavior
I think for MAC OS, getKeyChar() does not return the correct character, even
for KeyTyped Event, as can be checked by printing the key character values
inside keyTyped() API as:
System.out.println("The key Typed Char is : '"+ke.getKeyChar() + "'");
System.out.println("The key Typed s Code is : " + ke.getKeyCode());
So does this a buggy behavior?
Thanks
Sanjeev

Similar Messages

  • Are there any other hidden editing options?

    Thanks to this forum, I've found the redeye tool in iPhoto to be quite useful, but this wasn't the case before I found out about the Caps-Ctrl-9 trick that was posted in this forum.
    Are there any other tricks that anyone has discovered in iPhoto that isn't mentioned in the help list?
    And any speculation as to why these tools aren't mentioned in the help file? I mean, at first I was ready to give up on iPhoto because of the weak redeye. Why wouldn't they show us how to do this?
    Thanks again to everyone here for contributing and making this a great place to learn about my Mac!
    Paul
    15" MacBook Pro 2.33GHz   Mac OS X (10.4.8)  

    Paul:
    Welcome to the Apple Discussions. There is a hidden feature for changing the Redeye and Retouch tool size:
    How to Change the Size of the Retouch and Red-Eye Removal Tool
    Type Caps lockControl9
    Undo caps lock
    Click on the Retouch or Red-Eye Removal tool
    The tab key will toggle between cursor types, a cross or a circle
    The "[" and "]" keys decrease or increase the size accordingly.
    NOTE: Using the "{" "}" keys will will change the value next to the circle and that represents the degree of change or intensity that the tool imparts on each pass.
    Also check out the tip at the end of my signature for backing up the library database file on a frequent basis.
    Do you Twango?
    TIP: For insurance against the iPhoto database corruption that many users have experienced I recommend making a backup copy of the Library6.iPhoto database file and keep it current. If problems crop up where iPhoto suddenly can't see any photos or thinks there are no photos in the library, replacing the working Library6.iPhoto file with the backup will often get the library back. By keeping it current I mean backup after each import and/or any serious editing or work on books, slideshows, calendars, cards, etc. That insures that if a problem pops up and you do need to replace the database file, you'll retain all those efforts. It doesn't take long to make the backup and it's good insurance.
    I've written an Automator workflow application, iPhoto dB file backup, that will copy the selected Library6.iPhoto file from your iPhoto Library folder to the Pictures folder, replacing any previous version of it. You can download it at Toad's Cellar. Be sure to read the Read Me pdf file.

  • When opening any page associated with Google (main search page, gmail, google maps, etc) the font is so tiny it is unreadable. Any other website is fine and this only happens with Mozilla. I just downloaded 3.6.12 and it's still a problem.

    When opening any page associated with Google (main search page, gmail, google maps, etc) the font is so tiny it is unreadable. Any other website is fine and this only happens with Mozilla. I just downloaded 3.6.12 and it's still a problem.

    Reset the page zoom on pages that cause problems: <b>View > Zoom > Reset</b> (Ctrl+0 (zero); Cmd+0 on Mac)
    * http://kb.mozillazine.org/Zoom_text_of_web_pages

  • No preview or preview button appears when I try to print a web page, as it does for any other file. How can I arrange for preview?

    n the dialog box that appears when I try to print any web page, there is neither a preview nor a preview button, (although there is a preview if I open the web item as a pdf file, but that takes an extra step. A preview appears when I print any other file on my computer (a Macbook). Is there a setup procedure that will give a preview when printing one or several web pages?

    The Print button in the "3-bar" Firefox menu button drop-down list opens the Print Preview window.
    You can click the Print button in the Print Preview window or use the Print item in the File menu (File > Print) or use the Ctrl+P shortcut to have access to the print selection item and other print setup options.
    * Tap the Alt key or press F10 to show the Menu bar.
    * Use "View > Toolbars > [X] Menu Bar" to have the menu bar visible permanently.
    *Universal Print: https://addons.mozilla.org/firefox/addon/universal-print/

  • Adobe ID error must use "Adobe ID that hasn't previously been used to authorize any other computer"

    I am doing some testing and screenshots for my public library right now. After upgrading from ADE 1.7 to 2.0 on an authorized machine, I pressed CTRL + SHIFT + D in order to deauthorize. I then attempted to add the exact same Adobe ID to the computer and a get this error message.
    "You can only authorize this computer with an Adobe ID that hasn’t previously been used to authorize any other computer or mobile devices. Please try again."
    This is bizzare and goes against my understanding of ADE. In 1.7, you could use the same Adobe ID on any combination of (6) device. This seems to be suggesting that my Adobe ID must be original each time one authorizes. My questions are:
    Does this really mean one needs to make a new Adobe ID every time you use CTRL + SHIFT + D?
    What happens to hold DRM ebooks on your computer that were tied to the Adobe ID that ADE 2.0 won't accept?
    If anyone has any insights on this, I'd love to hear them.

    No.  You previously authorized the computer anonymously, and you can only 'upgrade' an anonymous user to one that hasn't been used before.
    You can either de-authorize the anonymous user (and lose all access to content tied to that user), or you can use a brand new AdobeID that hasn't been used for ebooks before.
    If you just activated anonymously by mistake and don't have any content yet, you most likely want to deactivate and start again.

  • You can only authorize this computer with an Adobe id that hasn't been previously used to authorize any other computer or mobile device

    When I try to download a library book on my Kobo reader, I keep getting this message. First it tells me to change the computer's authorization to be associated with an Adobe ID. When I click on authorize after logging in, the message keeps telling my "you can only authorize this computer with an Adobe ID that hasn't been previously used to authorize any other computer or mobile device. I have no idea what this means. Help!

    Sometimes ADE gets its registration/activation confused and in a semi-authorized state.
    Uninstalling and reinstalling does not help, and indeed installation can even trigger this state.
    Unfortunately, it often then gives misleading error messages about what is wrong.
    A common incorrect message informs you that the ID is already in use on another computer and cannot be reused.
    Another is  "E_AUTH_NOT_READY"
    This can often be resolved by completely removing any authorization using ctrl-shift-D to the Library screen on ADE (cmd-shift-D if on Mac).
    Restart ADE, and then reauthorize with your (old) Adobe ID.
    In extreme cases on the mac, the following extra step has helped some people.  Navigate to /Users//Library/Application Support/Adobe/Digital Editions and drag the activation.dat file to the trash. If you are using 10.7, see Access hidden user library files | Mac OS 10.7 Lion. http://forums.adobe.com/thread/1265248?tstart=0

  • My mac wont send emails from yahoo or any other websites when using an external USB modem!

    My mac wont send emails from yahoo or any other websites when using an external USB modem! I have checked the settings and they seem correct. Can anyone help? I do not have snow leopard. I can log on my email accounts, open my incoming emails (with difficulty coz it asks me to "try again" ) but I can never send emails, I always get: "sending is taking a little long, try again".
    What is the problem? this is a hair puller !!!

    Clear the cache and the cookies from sites that cause problems.
    "Clear the Cache":
    * Tools > Options > Advanced > Network > Offline Storage (Cache): "Clear Now"
    "Remove Cookies" from sites causing problems:
    * Tools > Options > Privacy > Cookies: "Show Cookies"
    Reload web page(s) and bypass the cache.
    * Press and hold Shift and left-click the Reload button.
    * Press "Ctrl + F5" or press "Ctrl + Shift + R" (Windows,Linux)
    * Press "Cmd + Shift + R" (MAC)

  • I cannot print from elements 11 or 12. No problem from v9 or any other program

    I installed photoshop elents 11 then upgraded it to 12 and find it will not print. I have no problem when I use Version 9 or any other program. I am using Apple OS 10.10
    help!

    {Ctrl + P} and select your printer in the Printer - Name box near the top of that window.
    http://kb.mozillazine.org/Problems_printing_web_pages

  • We just added a new printer and bluetooth connection to our iMac.  Now iTunes does not recognize our iPads as devices.  Have already tried restarting everything.  Any other suggestions?

    We just added a new printer and bluetooth connection to our iMac.  Now iTunes does not recognize our iPads as devices.  Have already tried restarting everything.  Any other suggestions?

    You can try the steps recommended here: http://www.apple.com/support/ipad/assistant/itunes/

  • Data Recover From Formatted Drive? What is the best program to use to get back Logic Projects and any other file type?

    I was in the process of reorganising my hard drives so I could RAID them however I managed to corrupt one drive and had to format it which meant I lost all my Logic Files and some other files. I managed to save a lot of files (mainly video files) before I had to format the drive but I need a Data Recovery service that will not alter anything on the hard drive and will put all the formatted files (regardless of the type) back for me so I can get the rest of the ones I need.
    Thanks in advance.

    What about folders and such?
    No. FS doesn't reconstruct folders. However, Data Rescue does, depending on how you use it. About the only thing in Data Rescue a Quick Scan ever seems to show you are files that are already live.
    So that leaves you with a Deep Scan, or a Deleted Files scan. The first pass of a Deep Scan will attempt to retrieve folders and files, along with their original names. The second pass only looks for file patterns. Like recognizing a Photoshop .psd file. It will recover it, but give it a nonsense name. A Deleted Files scan only results in nonsense names of recognized file types; no folders.
    What were you using File Salvage on? A hard drive?
    Yes, though you can use it on a flash drive, or any other mounted drive.
    At the moment it is estimating 289 hours remaining on a 1TB drive. Can it not go faster?
    No, both of the software mentioned are slower than molasses in January. When you delete anything in Windows, its file table entry simply tagged as deleted. So to unerase them, the tag is removed. That's why it works to quickly and easily (assuming you haven't already overwritten the data to be recovered).
    In OS X though, the whole idea of the underlying UNIX structure is all about security. It's not supposed to be easy to retrieve deleted items. When you delete items, their file table entries are erased. So the only way to find deleted items is to scour the entire drive for BOF (Beginning Of File) markers that don't have a matching starting block to anything that is in the file table.
    Another question, half the drive was empty. Will it fly over that empty space or will it sieve through it incase there was some files stored on it?
    If you use the Expert mode is FS, you can choose to do that:

  • Can I install windows 7 on a potable Hard Drive using boot camp? or any other way to do so?? need help for college please

    I need to use windows in order to use Visual C++ for college but I don't have enough space in my internal Hard Drive so I want to install windows 7using boot camp or any other method on a portable hard drive and boot from it.
    Please help I need it as soon as possible for school. Thanks

    You can't boot Windows natively except on internal drives.
    You can use a VM and put the VM image (VHD) anywhere any drive you want.
    You are way too low on disk space, seriously so. And no room - even Windows and Mac OS should be warning and balking already.
    "emulator" is an old-school term, even true, running a Guest OS under Mac's as a virtual machine, shared resources (RAM, processor) is easier but not the same performance level as running natively.
    Comparison of VMware Fusion Parallels VirtualBox
    This just posted, an FAQ for Lion and Boot Camp 4.0
    Boot Camp 4.0, OS X Lion: Frequently asked questions

  • Index or any other?

    I have 2 tables that i am accessing through a database link and they have lots of data.
    one having over 1 crore and another more than 10 lakh.
    i have created indexes on the columns that are being used in where clause but
    still the query is taking lots of time to execute.
    so, what is advisible?
    to use index or any is there any other mechanism by which the time is reduced?
    thanks

    Hi,
    Post your sql query and Explain plan
    Regards

  • Any other ways to get parameters of a URL in a window method ?

    Hi,
    In SDN, i find the below two ways to extract the URL parameters, when i pass them while opening a new window. But, unfortunately they dont work for me. so, would like to know, if any other ways are existing to extract the URL parameters.
    1)
    HANDLEDEFAULT method of the window:
    DATA: lt_url_parameters TYPE tihttpnvp.
    wdevent->get_data(
    EXPORTING
    name = if_wd_application=>all_url_parameters
    IMPORTING
    value = lt_url_parameters ).
    2) In HANDLEDEFAULT method, have the URL parameter names as importing parameters and use them normally.
    If there is no other ways, can some one help me in pointing the issue that i face ?
    Note: I have wdevent (CL_WD_CUSTOM_EVENT) importing parameter in place.
    Thanks in advance,
    Gaurav.

    Hi,
    How you are trying to pass your parameters ? I believe you are using some SAP provided template (like for XSS) and relying on passing of some standard parameters. These parameters may be absorbed by the standard component and may not be passed to your WebDynpro Component. You can try passing them as application parameters.
    Thanks
    Prashant

  • I have the latest version of Adobe Reader and I still can not print adobe reader documents on my Mac Air laptop but I can print any other type of file or document?

    What settings need to be changed in order to print in Adobe Reader?

    Thank you for your kind and thoughtful input.
    My Adobe reader is the most current one that's out there per Adobe.
    Something like XII  or higher.
    As for my Outlook, it's MS Outlook 2003, and I believe it's Express Outlook.
    If I disable the Protected Mode, per your suggestion, maybe that will work.
    I'll try it.
    Thanks again, and if you have any other ideas, I would appreciate your
    thoughts.
    Thank you.
    Joel

  • My problem is very simple......firefox wont allow me save my downloads to any other location than my c drive....for example i have gone into options and set sav

    ''locking this thread as duplicate, please continue at [https://support.mozilla.org/en-US/questions/986549 /questions/986549]''
    my problem is very simple......firefox wont allow me save my downloads to any other location than my c drive....for example i have gone into options and set save downloads to my e drive....but still firefox keeps saving them to my c drive....i have 4 internal hard drives in my rig....and have tried saving downloads to them all.......why this is happening i cant understand....i have tried lots of suggestions....and have re-installed firefox multiple times

    hello, there's a general regression in firefox 27 that won't allow files to download directly into a root drive. please try to create a subfolder (like ''E:\Downloads'') and set this as default location for downloads...
    also see [https://bugzilla.mozilla.org/show_bug.cgi?id=958899 bug #958899].

Maybe you are looking for

  • Webcam Live - Unable to capture Video when "audio" is on

    Unable to capture Video when "audio" is checked. Error message "Unable to capture Video - check settings for video compressor and Audio compressor". What are these ?? I have Plantronics headset and have tried most "8bit, mono settings" Capture Video

  • Amount of mail messages slowing the app down?

    My mail app seems to be taking longer than before to fetch messages and I was wondering if it had anything to do with the amount of mail messages in my various mailboxes. Can someone tell me, should I be clearing out old mail messages or is it safe t

  • RMAN retention policy - backup spfile and then redundancy = 5 removes it.

    I have a database that is Oracle Standard Edition and it is version 9.2.0.6. The spfile has not changed since November, 2005. A list backup does not show an spfile backup with a tag of "hot_database_spfile_backup_full". I took a close look at the RMA

  • Error when reading the ID of the business system from the SLD

    Hi, I am working on a scenario JDBC - XI - BW (ABAP Proxies). I configured all the steps required to connect XI & BW systems. The SLDCHECK transaction is all green. I was able to connect to SLD from BW using SXMB_IFR tcode too. I was able to look at

  • Internal 4g Modem

    Dear Apple. PLEASE release an Macbook with an internal 4g modem..