EventInjector Keycodes

Could someone tell what's the correct nomenclature for the following with regard to the implementation of EventInjector.KeyCodeEvent?

SHIFT key

Enter key

ESC key

Return back or remove key

Thank you.

If you add one of the indicators of KeypadListener, you should be able to find what you need.

http://www.BlackBerry.com/developers/docs/5.0.0api/NET/rim/device/API/system/KeypadListener.html

For what is enter, go back, to escape or remove:

Characters.ENTERCharacters.BACKSPACECharacters.ESCAPECharacters.DELETE

Must be injected in your keyCodeEvent as a parameter "tank".

EventInjector.invokeEvent( new EventInjector.KeyEvent(EventInjector.KeyEvent.KEY_UP, Characters.DELETE, KeypadListener.STATUS_SHIFT) );

The above should simulate a shift + delete.

Tags: BlackBerry Developers

Similar Questions

  • Portege R200: Need keycodes for the mapping of the keys

    Hello

    There are many great mapping software keycodes GNU/Linux (like the quick access keys or fnfxd) but we need keycodes to use.
    I would like to know what are the codes that are bound to

    (1) TOSHIBA Assist button
    Presentation button 2) TOSHIBA

    for the key FN + codes see the/etc/fnfxd/keymap file (in GNU/Linux with installed of course fnfxd ;))

    Thanks in advacnce

    Sorry Kamil, but I don t think that someone here in the forum will be able to ask your advice.
    You ask keycodes. I think that these information are known only to a few programmers tools Toshiba who design and create such applications.

    But maybe you are a lucky man and someone will help you

    Good luck

  • I want to install a HD floppy Microsoft 2002, I have the keycodes, how can I do this? Windows XP, Works Suite 2002.

    I want to install a HD floppy Microsoft 2002, I have the keycodes, how can I do this? Windows XP, Works Suite 2002.

    Hi, Edward.

    Follow the steps listed here

  • I want to install a HD floppy Microsoft 2002, I have the keycodes, how can I do this?

    I want to install a HD floppy Microsoft 2002, I have the keycodes, how can I do this?

    Microsoft 2002 what?

  • the upgrade of my hard drive on an hp laptop. How to create a windows cd? KeyCode on laptop wallpaper

    the upgrade of my hard drive on an hp laptop.  How to create a windows cd?  KeyCode on laptop wallpaper

    You n "t do it this way.

    You use cloning software to clone your existing to the new disk drive.  For portable computers, you will need to purchase an external hard drive enclosure which is (a) compatible with your drive (SATA or PATA) interface and (b) compatible with external connections on your laptop (for example, USB, FireWire, eSata).  Do not spend a lot of money for this speaker ($ 10-$ 20).

    If your new hard drive Western Digital, you can get the free cloning (a 'special' version of Acronis True Image) of WD software (http://support.wdc.com/product/downloaddetail.asp?swid=119) or you can get it separately (this is not an exhaustive list and is in no particular order):

    Acronis True Image Home 11
    EASEUS ToDo Backup
    Paragon Drive Copy or Partition Manager Personal
    Casper
    Norton Ghost

    The process is simple:

    1. Install the software on your laptop for cloning
    2. RTFM (do not skip this step)
    3. Install the new drive in the external case
    4. Connect new player to the computer
    5. Clone original disc on new drive
    6. Stop
    7. Unplug the external computer case
    8. Exchange records (original for external disk) and the new laptop drive
    9. Reboot and enjoy your new drive.

    When you know that the cloning operation was successful, format the old drive, which is now in the external case and use it for backup of data.

  • KeyCode not saved in Windows vista

    Original title: WINDOWS PROBLEM Please HELP?
    I TURNED ON MY DESK TONIGHT, BUT IT NOT GO TO THE SPLASH SCREEN.  INSTEAD, HE WANTED ME TO GET MY THE KEY CODE [THAT WAS WEIRD] BUT I DID.   NOW ITS ME ALWAYS SAYS THAT «KEYCODE NOT SAVED IN WINDOWS VISTA»  I'VE UPGRADED TO VISTA XP I THINK A WEEK AGO.                                                                                                                                                                                     AND FOR THIS REASON, I CAN'T ACCESS MY MENU EVEN START TO KNOW SOMETHING ABOUT WHAT IS GOING.   Help, please?

    Hello

    Thanks for posting in the Microsoft community!
    If I understand correctly, you receive error message that keycode not saved in Windows vista when you have turned on the computer

    You can get in touch with the Microsoft Customer Service:

    How and when to contact Microsoft and support Customer Service
    http://support.Microsoft.com/kb/295539

  • How can I use EventInjector.TrackwheelEvent to scroll to the right and left?

    I need to simulate a right wheel and a wheel left action.

    I used to scroll up and down the following successfully:

    EventInjector.TrackwheelEvent.THUMB_ROLL_UP

    EventInjector.TrackwheelEvent.THUMB_ROLL_DOWN

    Any ideas?

    On devices on the wheel, by using Alt + scroll is used by many applications for the movement of left and right.

    If you target trackball devices, you can navigate in all directions by injecting an EventInjector.NavigationEvent event.

  • New installation of XP, keycode does not

    I recently bought a dozen Lenovo computers.  Some Thinkpad T510 and 400.  Some Thinkstation S20 and E20.  I have them all rights of Windows 7, but with XP pre-installed.  Since they came with a bunch of software assessment and some other junk on them I was just going to clean and reinstall XP.

    As computers have Win 7 rights, the tag on the back is a keycode Win 7 so I used one of the key finders to get the XP key off each machine code and all have the standard Lenovo preactivated key that works only on Lenovos.  So I erased the computer and installed XP Pro on all and all installs it took the keycode.

    Now normally Windows should see this keycode and detect that it is a Lenovo and not need to activate, however it prompts to activate.  But when I go to activate Windows tells me that the code is not valid.

    I have a feeling is what they keycode xxxxx-xxxxx-xxxxx-xxxxx-xxxxx is not match HKLM\Software\Microsoft\Windows\CurrentVersion\ProductID which varies according to the type of CD used to install XP Pro.  For example, if you use a CD XP Pro SP1 OEM to install XP your ProductID registry key will result in:

    XXXXX-OEM-0014324-XXXXX

    And SP2 OEM will result in:

    XXXXX-OEM-0060807-XXXXX

    So the question is, what the Lenovo XP Pro generates a product for the standard CD key identifier?  I probably know the answer if I does not format all the computers at the same time...

    You must get a restore CD XP from Lenovo. (you will need to call them for him) You will probably need to pay for shipping. If your warranty you need to do a no-cost. (by a message I saw by Mark_Lenovo) P.S. the more likely using an OEM XP disk. (as a disc of Lenovo WILL see your key integrated)

  • KeyCode is not running

    Hai...

    I have a problems with code blackberry's I give my code:

    protected void keyPressed( int keycode )
        {
            switch( keycode )
            {
                //case -1://up
                case 116: //up
                    switch (this.screen) {
                        case Kanpas.SCREEN_MAIN:
                            if(this.selected > 0)
                                this.selected--;
                            else
                                this.selected = 1;
                            this.repaint();
                            break;
                        case Kanpas.SCREEN_PLAYMIDI:
                            if( indexToStart > 0 )
                                indexToStart--;
                            this.repaint();
                            break;
                    }
                    break;
                //case -2://down
                case 98: //down
                //case -6:
                    switch (this.screen) {
                        case Kanpas.SCREEN_MAIN:
                            if (this.selected < 1)
                                this.selected++;
                            else
                                this.selected = 0;
                            this.repaint();
                            break;
                        case Kanpas.SCREEN_PLAYMIDI:
                            if( indexToStart < vLyrics.size() - maxLine )
                            {
                                indexToStart++;
                            }
                            this.repaint();
                            break;
                    }
                    break;
                //case -3: //left
                case 100: //left
                //case -2:
                    switch (this.screen) {
                        case Kanpas.SCREEN_MAIN:
                            if(this.selected > 0)
                                this.selected--;
                            else
                                this.selected = 1;
                            this.repaint();
                            break;
                        case Kanpas.SCREEN_PLAYMIDI:
                            if (this.volumeControl != null) {
                                int level = this.volumeControl.getLevel();
    
                                if (level > 0) {
                                    level -= 10;
    
                                    if (level < 0)
                                        level = 0;
                                    this.volumeControl.setLevel(level);
                                    this.left = true;
                                    this.right = false;
                                    this.repaint();
                                }
                            }
                            break;
                    }
                    break;
                //case -4: //right
                case 106: //right
                //case -5:
                    switch (this.screen) {
                        case Kanpas.SCREEN_MAIN:
                            if (this.selected < 1)
                                this.selected++;
                            else
                                this.selected = 0;
                            this.repaint();
                            break;
                        case Kanpas.SCREEN_PLAYMIDI:
                            if (this.volumeControl != null) {
                                int level = this.volumeControl.getLevel();
    
                                if (level < 100) {
                                    if (level <= 0) {
                                        this.volumeControl.setMute(false);
                                        level = 10;
                                    }
                                    else {
                                        level += 10;
    
                                        if (level > 100)
                                            level = 100;
                                    }
                                    this.volumeControl.setLevel(level);
                                    this.left = false;
                                    this.right = true;
                                    this.repaint();
                                }
                            }
                            break;
                    }
                    break;
                //case -5://enter,middle button
                case 103: //enter
                //case -20:
                    switch (this.screen) {
                        case Kanpas.SCREEN_MAIN:
                            if( this.selected == 0 )
                            {   //play the song
                                playMidi();
                                this.screen = Kanpas.SCREEN_PLAYMIDI;
                                // added by masbudi
                                indexToStart=0;
                                repaint();
                            }
                            else
                            {
                                this.main_.InitMenu();
                                this.main_.display.setCurrent(this.main_.extraFun);
                                //this.parent.extraFun.keypressAction("ENTER", this.parent.extraFun.currentMenu, true);
                                this.main_.extraFun.keyPressAction("ENTER", this.main_.extraFun.currentMenu, true);
                            }
                            this.stopTimerScrollingText();
                            break;
                    }
                    break;
                //case -6://left-ok button
                case 113://left-ok button
                //case -21:
                    switch (this.screen) {
                        case Kanpas.SCREEN_MAIN:
                            this.screen = Kanpas.SCREEN_CLOSINGSPLASH;
                            if(splash!=null)
                                splash = null;
                            splash = new SplashScreen();
                            mokaIntro();
                            if(timer!=null)
                            {
                                timer.cancel();
                                timer = null;
                                splash=null;
                                headerAnim=null;
                            }
                            splash = new SplashScreen();
                            timer = new Timer();
                            timer.schedule(splash, 0, 250);
                            break;
                        case Kanpas.SCREEN_PLAYMIDI:
                            stop();
                            if(timer!=null)
                            {
                                timer.cancel();
                                timer = null;
                                splash=null;
                                headerAnim=null;
                            }
                            backToMain();
                            break;
                    }
                    break;
            }
        }
    
        protected void keyReleased(int keycode) {
            switch (keycode) {
                //case -3://
                case 100: //left
                //case -2:
                    switch (this.screen) {
                        case Kanpas.SCREEN_PLAYMIDI:
                            this.left = false;
                            this.right = false;
                            this.repaint();
                            break;
                    }
                    break;
                //case -4:
                case 106: //right
                //case -5:
                    switch (this.screen) {
                        case Kanpas.SCREEN_PLAYMIDI:
                            this.left = false;
                            this.right = false;
                            this.repaint();
                            break;
                    }
                    break;
            }
        }
    

    Like this.. but this still does not work on the emulator or on blackberry HP

    any solution for this

    concerning

    Andi

    Some clues.

    http://supportforums.BlackBerry.com/Rim/Board/message?board.ID=java_dev&thread.ID=23314&view=by_date...

  • With the help of EventInjector

    I use BlackBerry 8520. I'm developing an application to implement the functionality of EventInjector. In my application I spawn a thread that is supposed to type a phone number on the home screen. As soon as I launch the application, I return to the home screen and wait for the number to type. Here is the code I use, but I'm unable to implement the features you want.

    Just to inform, I used the code on Simulator and device

    KeyPress EventInjector.KeyCodeEvent = new EventInjector.KeyCodeEvent (EventInjector.KeyCodeEvent.KEY_DOWN, Characters.DIGIT_NINE, KeypadListener.STATUS_ALT, 3000);

    EventInjector.KeyCodeEvent keyRelease = new EventInjector.KeyCodeEvent (EventInjector.KeyCodeEvent.KEY_UP, Characters.DIGIT_NINE, KeypadListener.STATUS_ALT, 3000);

    keyPress.post ();

    keyRelease.post ();

    Sleep(); sleep for 5 seconds

    keyPress = new EventInjector.KeyCodeEvent (EventInjector.KeyCodeEvent.KEY_DOWN, Characters.DIGIT_EIGHT, KeypadListener.STATUS_ALT, 3000);

    keyRelease = new EventInjector.KeyCodeEvent (EventInjector.KeyCodeEvent.KEY_UP, Characters.DIGIT_EIGHT, KeypadListener.STATUS_ALT, 3000);

    keyPress.post ();

    keyRelease.post ();

    Sleep(); sleep for 5 seconds

    keyPress = new EventInjector.KeyCodeEvent (EventInjector.KeyCodeEvent.KEY_DOWN, Characters.DIGIT_SEVEN, KeypadListener.STATUS_ALT, 3000);

    keyRelease = new EventInjector.KeyCodeEvent (EventInjector.KeyCodeEvent.KEY_UP, Characters.DIGIT_SEVEN, KeypadListener.STATUS_ALT, 3000);

    keyPress.post ();

    keyRelease.post ();

    Sleep(); sleep for 5 seconds

    Solved...

  • EventInjector getStatus()

    Hello again

    I can't find the documentation on the values returned from getStatus(), is there someone who knows where to find that?

    Thank you.

    Support person 3: it comes to the STATUS_ * fields defined in the KeypadListener method.  It is documented in the constructors for classes of EventInjector, but not within get/setStatus.  I have this so added note to avoid any future confusion.

  • Keypad.Key (keycode) == Keypad.KEY_MENU, which, for the back button?

    As the title,

    I use

    Keypad.Key (keycode) is Keypad.KEY_MENU

    to listen to the menu button

    What is the correct keyboard for the previous button using Blackberry JDE 4.2?

    Thank you.

    Keypad.KEY_ESCAPE

  • Cannot close the camera using EventInjector for touchscreen models

    Hi all

    In my application, I opened the app native camera help

    Invoke.invokeApplication (Invoke.APP_TYPE_CAMERA, new CameraArguments());

    I have a listener added to monitor changes made to the file system. As soon as a new image is taken and added to the file system, the camera is close to the EventInjector.

    I'm running it on JRE 5 and 6, and it works very well for models with no touch screen on the Simulator. However, it will not work for 9550 and 9800. On simulators, it is frozen just after the photo is taken (and probably saved). I loaded my torch, the photo is taken, then he brought me to the camera application instead to close the camera and take back me to my request.

    There should not be a problem with my code, as I moved to a programme of work. So what could be the problem?

    Same assumptions or any help would be appreciated.

    Thank you very much

    Tina

    Hey everybody,

    I solved the problem... It's because you don't have the appropriate permissions for your application to INJECT key events... Use the following code to request the appropriate permissions and you'll be on your way to the injection of events!

               ApplicationPermissionsManager permManager = ApplicationPermissionsManager.getInstance();
    
                if(permManager.getPermission(ApplicationPermissions.PERMISSION_INPUT_SIMULATION ) != ApplicationPermissions.VALUE_ALLOW ||                permManager.getPermission(ApplicationPermissions.PERMISSION_IDLE_TIMER ) != ApplicationPermissions.VALUE_ALLOW  )             {             //Request our permission to inject events             ApplicationPermissions pAppPermission = new ApplicationPermissions();
    
                pAppPermission.addPermission(ApplicationPermissions.PERMISSION_INPUT_SIMULATION);               pAppPermission.addPermission(ApplicationPermissions.PERMISSION_IDLE_TIMER);
    
                  if( permManager.invokePermissionsRequest(pAppPermission) == false)                {
    

    Please give Kudos if it solves your problem

  • Capture the Keycodes / keyDown in BasicEditField with digital filter

    I tried to understand cela other posts and the API, but I can't seem to get it.

    I created a BasicEditField and applied a filter TextFilter so that it can accept only digital entries. It is the substitution of the event keyDown as expected, but I can not just to capture "1,2,3,4,5,6,7,8,9,0" - he used ' enter my conditional statements - which of course means that the controls do not work.

    I tried the keycodes of compairing the raw numbers, converted characters, KEY_NUM2 and basically everything that was suggested, but I'm obviously missing something.

       BasicEditField numEnter = new BasicEditField()    {     protected boolean keyDown(int keycode, int time)      {             int key = Keypad.key(keycode);                //char key = (char) Keypad.key(keycode);              //this.setText(Integer.toString(key));
    
              //if (key == Characters.DIGIT_ONE)            //if (keycode == 570163217)               if (key == 01)                {                                 this.setText("ONE");              }             else if (keycode == 45219842)             {                                 this.setText("TWO");              }
    
              return false;     } };
    
      // set the filter numEnter.setFilter(TextFilter.get(TextFilter.NUMERIC));
    
     // add to field manager   hfm_logo.add(numEnter);
    

    As always, your help is always appreciated.

    Well...

    It is the solution that I came. Don't know if it's fair, but it seems to work.

    Basically, with the NumericFilter codes keyboard is the same as if you have the filter applied or not to the text box, so even if you override the keydown it doesn't matter if you're trying to intercept him because he gives you the key you pressed on, not what appear after the filter.

    That being said, if you try to do this in the keyDown as you cannot capture because the character needs to be painted on the screen first, otherwise you get an error happens nowhere. So if you paint the screen first and then take some text is located in the numEnter, then put it to white even once, you can capture the NUMBERS that are entered (forcably) on each keyboard phone.

    Tested with:

    9000

    8110

    8820

    8800

    8300

    Should work with anything 4.2.0 + JDE

     EditField numEnter = new EditField()
        {
    
            protected void paint(Graphics graphics)
            {
                super.paint(graphics);
    
                if (this.getText().length() > 0)
                {
                    switch (this.getText().charAt(0))
                    {
                    case Characters.DIGIT_ONE:
                        text.setText("DIGIT_ONE");
                        break;
                    case Characters.DIGIT_TWO:
                        text.setText("DIGIT_TWO");
                        break;
                    case Characters.DIGIT_THREE:
                        text.setText("DIGIT_THREE");
                        break;
                    case Characters.DIGIT_FOUR:
                        text.setText("DIGIT_FOUR");
                        break;
                    case Characters.DIGIT_FIVE:
                        text.setText("DIGIT_FIVE");
                        break;
                    case Characters.DIGIT_SIX:
                        text.setText("DIGIT_SIX");
                        break;
                    case Characters.DIGIT_SEVEN:
                        text.setText("DIGIT_SEVEN");
                        break;
                    case Characters.DIGIT_EIGHT:
                        text.setText("DIGIT_EIGHT");
                        break;
                    case Characters.DIGIT_NINE:
                        text.setText("DIGIT_NINE");
                        break;
                    case Characters.DIGIT_ZERO:
                        text.setText("DIGIT_ZERO");
                        break;
                    }
    
                    this.setText("");
                }
            }
        };
    
  • EventInjector for NumLock does not result

    I have search high and low (I'm sure that's what everyone says) but I can't get the EventInjector to work. Here's my situation

    I have an EditField which takes input like a currency (10.00 or 12.56) field. I have a TextFilter on the ground so that the only acceptable characters are numbers and the '.' It works very well.

    Now, I am trying to affect the onFocus() NumLock field (123 in the top right corner) of the EditField. Then I thought, use the EventInjector for the KEY_ALT and the SHIFT_LEFT. Here is my code, which produces no result.

    JDE is 4.7

    running on devices that have the OS 4.6 and higher only

    public EditField amountField(String label, String value, int max, long style){
            EditField _field = new EditField(label, value, max, style){
                protected void onFocus(int direction){
                    //Dialog.alert("gained focus");
                    try {
    
                    EventInjector.KeyCodeEvent altKeyDown = new EventInjector.KeyCodeEvent(
                            EventInjector.KeyCodeEvent.KEY_DOWN,
                            ((char) Keypad.KEY_ALT),
                            0);
                    altKeyDown.post();
                    EventInjector.KeyCodeEvent shiftKeyDown = new EventInjector.KeyCodeEvent(
                            EventInjector.KeyCodeEvent.KEY_DOWN,
                            ((char) Keypad.KEY_SHIFT_LEFT),
                            KeypadListener.STATUS_ALT);
                    shiftKeyDown.post();
                    EventInjector.invokeEvent( new EventInjector.KeyCodeEvent(EventInjector.KeyCodeEvent.KEY_UP,
                            (char)Keypad.KEY_SHIFT_LEFT,
                            KeypadListener.STATUS_ALT));
                    EventInjector.invokeEvent( new EventInjector.KeyCodeEvent(EventInjector.KeyCodeEvent.KEY_UP,
                    (char)Keypad.KEY_ALT, 0));
                } catch (Exception e) {
                    System.out.println("ExpenseSreen_amountField (Error) " + e.getClass() + ":  " + e.getMessage());
                }
    
                }
    
                protected void onUnfocus(){
                    Dialog.alert("lost focus");
                }
            };
        return _field;
       }
    

    Can anyone suggest what I do wrong?

    As a side note, I already have the default permissions for my application to ALLOW for EVERYTHING.

    new EditField("Amount: ", "", 10, EditField.FILTER_REAL_NUMERIC);
    

    Everything you need...

Maybe you are looking for