Keyboard applications

hi
i want to know how to develop a code managing the keyboard like adding special right click command , for example when you highlight a line and you right click you find special command .
and like adding a hot key

Here is a simple demonstration of a JPopupMenu with Shortcut Accelerators:
import javax.swing.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.awt.event.KeyEvent;
import java.awt.Event;
class Test extends JFrame {
     private JLabel label;
     private JPopupMenu jpm;
     private JMenuItem changeTextItem;
     private JMenuItem resetTextItem;
     public Test() {
          initComponents();
     private void initComponents() {
          label = new JLabel("Right-click on me, and select Change Text (or press CTRL+G)");
          label.setSize(400, 20);
          label.setLocation(5, 5);
          jpm = new JPopupMenu();
          changeTextItem = new JMenuItem("Change Text");
          changeTextItem.setMnemonic((int)'C');
          changeTextItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_G, Event.CTRL_MASK));
          resetTextItem = new JMenuItem("Reset Text");
          resetTextItem.setMnemonic((int)'R');
          resetTextItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_R, Event.CTRL_MASK));
          label.add(jpm);
          jpm.add(changeTextItem);
          jpm.add(resetTextItem);
          this.getContentPane().setLayout(null);
          this.getContentPane().add(label);
          this.pack();
          this.setSize(500, 300);
          this.setLocationRelativeTo(null);
          this.setTitle("Test Application");
          this.setDefaultCloseOperation(EXIT_ON_CLOSE);
               label.addMouseListener(new MouseAdapter() {
                    public void mouseClicked(MouseEvent evt) {
                         if( evt.getButton() == MouseEvent.BUTTON3 )
                              jpm.show(label, evt.getX(), evt.getY());
               changeTextItem.addActionListener(new ActionListener() {
                    public void actionPerformed(ActionEvent evt) {
                         label.setText("You clicked on the menu-item!");
               resetTextItem.addActionListener(new ActionListener() {
                    public void actionPerformed(ActionEvent evt) {
                         label.setText("Right-click on me, and select Change Text (or press CTRL+G)");
     public static void main(String[] argv) { new Test().setVisible(true); }
}

Similar Messages

  • N82 - Nokia SU-8W Wireless Keyboard application

    Hi All
    Whereas on N95 the Wireless Keyboard application can be found in "Office" folder, it seems to be absent on the N82.
    You need to download S60 3.1 Edition .sis 28th May 2007 and installer in PC Suite will place it in "Connectivity" folder on phone.
    Open "Wireless Keyboard" application and pair as usual.
    Application can be found here:
    http://europe.nokia.com/A4144291
    Happy to have helped forum in a small way with a Support Ratio = 37.0

    Hi mw999
    Yes, I am sure that it works as this post was typed using SU_8W
    Happy to have helped forum in a small way with a Support Ratio = 37.0

  • N8 Qwerty keyboard application?

    Is there an application for improving the size of the keyboard? I can use Swype but often I prefer to tap out messages and my fingers are a bit podgy!
    Solved!
    Go to Solution.

    Hi mittsdad,
    It's most likely not possible to enlarge the size of the key board as it would simply not fit the screen. Use the horizontal keyboard instead by twisting the phone horizontally whilst texting. This key board is broader than the vertical key board. 
    Iris9290
    If my post has helped you in any way, please accept it as a solution or click on the white star, so that other users will be able to benefit from it too.

  • SMS and other Keyboard applications

    The keyboard is really great, but I still occasionally make errors. However I have found that while on safari, when the keyboard is horizontal, my accuracy improves drastically. I believe this is because the size of the keyboard increases. I think it would be helpful if the next updated software made the gyroscope allow horizontal keyboard in other applications. Especially SMS and email.

    You can ask Apple for iPhone changes via this link:
    http://www.apple.com/feedback/iphone.html Though if you're requesting hardware changes for iPhone v2 you may want to wait a week (or a month?)...they're probably going to be inundated right now by requests for software changes to the current iPhone.

  • Wireless Keyboard application SU-8W for Nokia Seri...

    When I try to install the update for SU-8W, 27-Aug-2008 for N82 I get a message, update error.
    The .sis is 1.31(5) I have tried via PC-Suite and via direct to phone download and receive the same update error both ways.
    Solved!
    Go to Solution.

    Hijpwb
    Following your advice I uninstalled v1.31.2 and noticed that if using download application on phone it wanted to provide v1.31.2 again but if downloaded on PC from SU-8W support then v1.31.3 was provided.
    Although set to English there is no way that I can get it to print a "£" although "€" is no problem and it still produces unexpected results towards the right end of top line.
    Happy to have helped forum in a small way with a Support Ratio = 37.0

  • How can I create a virtual keyboard shortcut in my dock?

    So I started using my MacBook Pro as a device I connect to my TV. I have an HDMI adapter, and, after setting up the display and sound, it is awesome! I even purchased a Trackpad so I can sit on my couch and navigate. The cost of the adapter and Trackpad are more than paid for with my canceling of cable.
    Anyway, my question is about the virtual keyboard in OS X. It doesn't happen often, but I sometimes have to type in a user name or password for sites. I know how to go through "System Preferences", "Universal Access", and then "Keyboard Preferences" to turn it on, but is there a faster way?
    What I really want to know is if I can create a shortcut in my dock for the virtual keyboard?
    If not, does anyone know of any third party, virtual keyboard applications that would work this way?
    Thanks!

    @ KA-BOOM!!
    Okay, try this:
    1. Copy KeyboardViewer.app to your Applications folder (or wherever you want it).
    2. Edit this copied KeyboardViewer.app bundle with TextWrangler or a comparable text editor or a property list editor, changing a single character in KeyboardViewer.app/Contents/Info.plist so that the value for NSUIElement is 0 instead of 1.
    3. Drag the new KeyboardViewer.app to the Dock.
    When you want to quit the application, do so from the Dock icon.  (If you click the red button--the usual way to quit KeyboardViewer when it has been invoked from the menu extra--the application will keep running facelessly in the background and you won't be able to get the KeyboardViewer GUI back again unless you kill its process or restart.  All in all, quitting from the Dock icon is the quickest solution.)

  • HTC Rezound Keyboard issues.

    I've seen people having issues with their keyboards lagging, but right now mine isn't showing up at all. I tried to send a text message and clicked add text multiple times, but to no avail. I tried restarting my phone twice and even shut down my phone for about 10 minutes and still no luck. This is the first time this has happened since I got the phone in December and just started after my phone died and I plugged it up to the charger.

        Hi there mlw9911!
    How bizarre. Good thing this VZW agent is on the job and ready to get to the bottom of the case of the phantom keyboard. So, let's work on this together.
    Now, you've done a great job troubleshooting thus far and I appreciate that. With that said, we need to delve deeper in the device. Given that this is an issue with a missing keyboard, here's what I recommend: go to settings > applications > manage applications > all > locate the keyboard application > clear cache and force close. Then reboot your device and give it a go. Please let me know the results.
    EvanO_VZW
    VZW Support
    Follow us on Twitter @VZWSupport

  • IOS 8 Missing third party keyboards in some apps

    I have iOS 8.02 installed on an iPhone 5S. Have also installed third-party keyboard applications (Swype, Swiftkey, Minuum), however, they only appear in some of the applications. The third-party keyboards are missing from the Messages, Notes and Reminders applications. It works perfectly in Mail and Safari. This same issue occurred with IOS 8.0.
    I have installed the same keyboards on another iPhone 5s and an iPad 3,  on these devices the keyboards work perfectly on all applications. These are using IOS 8.0.
    Have tried uninstall, reinstalls and resetting the device. Also did a restore and device reset and nothing seems to fix this.
    Any ideas?

    I'm having the same issue. IPhone 5S has third party keyboards working in safari but not other apps (8.02). IPad with 8.02 has them working everywhere. Any ideas?

  • Weight/dimensions of brand new wireless keyboard? Use with Nokia S60 3rd?

    Hi,
    I am considering the new apple wireless keyboard (aluminium) to use with my Nokia N80 / N95 phones, but the exact specifications are nowhere to be found.
    Can anyone tell me if it is:
    - compatible with the bluetooth HDI profile like the previous model?
    - how much it weighs?
    - what its dimensions are?
    Has anyone, by any chance, tried using it with a Nokia S60 3rd edition phone like a nokia E series or N series?

    hi there,
    yes, i can confirm the usage of the new bluetooth aluminium keyboard in conjunction with my nokia n95 via the 'wireless keyboard' -application which is located in the office-folder of the n95.
    i got it paired with no problems and the usage itself is also perfect.
    best,
    netshare

  • Multi-language support for iPod Touch keyboard

    "There might be an app for that" sounds good, but trying to find anything on the Apple site is a nightmare. I'm simply looking for a multi-language touch keyboard application for my iPod Touch.
    I type quite a bit in German and need to easily switch between English (Qwerty) and German keyboards.
    Does anyone know of an App for this? If so, could you please post the URL?
    Thanks

    It's built in to your iPod Touch. See page 30 of the User Guide.

  • Keyboard Layout SU-8W with e51

    I have an e51 which mates easily via Bluetooth with my SU-8W keyboard.
    2 problems:
    1) despite what the manual says, pressing the AltGr key produces no list of special characters -- in fact, it does nothing at all
    2) pressing combination keys involving SHIFT or FN often produces a character different from that printed on the character key.
    Any feedback would be appreciated!

    Hi michaelglynn
    On newer Nokia models absence of mention means that Wireless Keyboard application is pre-installed in device firmware although may be found under "Office" or "Connectivity".
    Your E51 should use:
    Wireless Keyboard application for Nokia Series 60 3rd edition
    Nokia_bt_keyboard_1_30.SIS
    10-Apr-2006 | 182.90 KB | English
    Happy to have helped forum in a small way with a Support Ratio = 37.0

  • Wireless Keyboard not working with Tungsten T5

    I recently purchased a Universal Wireless Keyboard that I'd hoped to use with my Tunsten T5 while on a trip.  Unfortunately, I wasn't able to get it working before I left.  Now I'm back and want to try again, but need some help.
    I'm running Vista on my PC, so the software that came on the install CD with the keyboard wouldn't work.  I checked online and downloaded what I thought was the proper file and it seemed to install fine when I synced, but when I turn the keyboard on and place the T5 in it's cradle, nothing happens.  And, yes, I've careful to position the wand over the top of the device where the infrared port is.
    Any thoughts or suggestions?
    Post relates to: Tungsten T5

    I don't see a way to turn on the application on the T5.  When I run the Keyboard application, I just get a screen where I can set the Key Repeat Rate, the Delay Until Repeat interval, a place to test Repeat Settings, and check boxes to enable key clicks and the keyboard.  If I enable the keyboard (is that "turning it on") and go into Documents to Go, then the keyboard doesn't work and when I go back into the Keyboard application, the enabling checkbox is no longer checked.
    I also don't see a way to enable Infrared.  If I look under Connections, there are choices to enable IR to a PC/Handheld and several other devices, like a Universal Drive.  But there's no choice for a Wireless Keyboard.  If I look under Power, Beam Receive is ON.
    Post relates to: Tungsten T5

  • Mac Mail custom keyboard shortcuts won't work

    I'm using Mac Mail, trying to set keyboard shortcuts to set flags
    - I goto preferences/keyboard/application shortcuts
    - click on "+" to add shortcut
    - specify Mail shortcut in dropdown menu
    - add 6 different shotrcuts OPT/CMD-_ (where _ is: L S V F R P)
    - when I added the shortcut, i was very careful to make sure the MENU TITLE of the shortcut in  OS-X preferences paine is the same as the
    Then, in Mail app, reading a message, I press the shortcut (ex: OPT/CMD-L), and the flag is not set

    I'm having this exact same problem with Mail.app on Mavericks, and my workaround is exactly the same.  Doesn't it sort of defeat the whole purpose of keyboard shortcuts if I have to grab my mouse to expose the relevant menu?!  Very frustrating.  Does anyone know how to either 1) find a better workaround on our end or 2) convince Apple to fix the problem?
    #2 seems unlikely since custom keyboard shortcuts is probably a pretty rarely used feature...

  • Czech keyboard layouts

    Is any way get czech keyboard layout for Wireless keyboard in Nokia E51 ?
    In E51 is Wireless BT keyboard application, but it is from 2006 year and it has not czech layout. I am tried install new sw for nokia BT keyboard from pages (2008), but is impossible install it into E51.

    http://docs.info.apple.com/article.html?artnum=307354

  • How do I customize application shortcut keys Macbook Pro

    Hey Guys,
    I know how to set up shortcut keys...systems preferences>keyboard>applications...but when I attempt to make a shortcut key, for example to open iTunes I used the shortcut command+control+I but when I close iTunes and try to open it using this combination of buttons nothing happens and I don't have any idea why.
    Any help would be great!

    Different applications have their own shortcuts.   A MacBook Pro is a notebook, whereas a Mac Pro is a desktop machine.   Unless the shortcut is made to function across all applications, you will only get it to work in the application you set it up in.  http://startly.com/ is a popular third party software used for keyboard shortcuts.  Note, they appear not yet to be ready for Mountain Lion.

Maybe you are looking for

  • HT1819 error in iTunes #11111, try again later. Never works.  What's up?

    Produced a podcast in garageband, post it in iWeb, but when i submit it to iTunes, I keep getting a message of an error in iTunes #11111, try again later. Never works.  What's up?

  • Delete from backup

    I have time machine enabled on my mac and it's been woprking fine. Recently, My Sophos antivirus flagged a virus located in my backup files from time machine. However, when i navigate to the file or folder and try to delete it or move to trash, I get

  • Can I Move the Anchor Point for Adjustment Brush in ACR CS5

    It's never been a problem before, but the anchor point for the Adjustment Brush in ACR is sitting exactly where I need to see what is happening.  I can delete and start again, but if there is way to move or hide the anchor point while stil being able

  • Firefox does not save my settings when I reboot

    I have Windows 7 Ultimate. I was having problems with Firefox 3.6.16 crashing to the point where it wouldn't work. I uninstalled it and downloaded version 4 but had problems with it hanging all the time. I went through the help section, one of the th

  • Scroll Event on a hierarchical tree

    Is it possible to intercept a scroll event on a hierarchical tree item, and how much the tree has been scrolled? many thanks in advance, Michele Pantaleo null