trying to capture press ENTER or wheel on listfield

Hey,.

I have a ListField and a BasicEditField on the same screen. After the substitution of such methods below that Yes, other than the ENTRANCE keys do seem to do not produce all the actions. someone help me on this please? I want to capture enter and wheel press right on the listfield, so that I can use it as a typical menu.

Thank you

protected boolean navigationClick(int status, int time) {
    System.out.println("wheel pressed");
    return true;
}

protected boolean keyChar(char key, int status, int time) {
    boolean retVal = false;

    if(key == Characters.ENTER){
        System.out.println("pressed enter");
        retVal = true;
    }

    return retVal;
}

Re trackwheelclick/navigationclick, see this thread:

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

To substitute, either extend the class and create your own ListField or use an inner class as follows:

ListField mylistField = new ListField() {
    protected boolean keyChar(char key, int status, int time) {
        // your code here
    }
};

Tags: BlackBerry Developers

Similar Questions

  • I have type in a new web site in the address bar. Press enter, nothing happens? Went to internet expl. ORER and tried. It worked. Uninstalled Mozilla twice. reinstalled. Still, the address bar does not go to the new site. What I am doing wrong?

    I type in a new web site in the address bar. Press ENTER. Wait. Wait. type in the same new website in the search bar. It goes straight. Uninstalled Mozilla twice. Reinstalled. Tried to go to a new web site. you press on enter. Nothing. What I am doing wrong? I tried this procedure in Internet Explorer and the new address was excluded.

    Hi markehrmann,

    I'll try from Firefox Firefox to solve the issues in Safe Mode. If you do not have the issue so that all your modules, extensions, and themes are disabled, you can try adding them in one by one until you find the culprit. You should look at the guide to troubleshooting Extensions and themes and article troubleshooting issues with plugins like Flash or Java to solve common Firefox problems as well.

    Hope this helps!

  • Cannot be found in the location or the search box; I type the words, but nothing happens when I press enter or click the search arrow

    I had the problem of the length so I downloaded Fiefox again. However, now I can't get anything. I tried the suggestion to try the Safe Mode, with disabled modules, but it is still not let me search any URL or keywords. When I type anything in a box, pressing enter or the search arrow does nothing. Help, please!

    Hi Dudica, please make sure that you do not use firefox in compatibility mode: https://support.microsoft.com/en-us/kb/292533

  • By pressing the mouse wheel Center is no longer, a link opens in a new tab.

    By pressing the mouse wheel Center is no longer, a link opens in a new tab. I tried to disable all add-ons, the problem still exists. I tried upgrading my mouse driver, it was already up to date.

    I already tried all the advice from this old question: http://support.mozilla.org/en-US/questions/783155?s=mouse+scroll+wheel+open+new+tab & r = 0 & as = s

    Firefox 14.0.1 on Windows 7. I use a Case Logic wireless mouse. There was a recent update from Windows. The opening in a new ability to tab disappeared after this updated, but not immediately after.

    Do a "Reset Firefox" seems to have solved the problem.

  • My search toolbar no longer works. I can tap into it, but it won't let me search for it. It does nothing when I press enter or click the magnifying glass. What can I do?

    Before, I type in a Word and press enter and get the results on a page. Now, when I type in the search bar, I use Google, Yahoo or any other search engine, I press Enter and nothing happens. I tried to restore the default values and to re - download Firefox without result.

    Start Firefox in Firefox to solve the issues in Safe Mode to check if one of the Add-ons is the cause of the problem (switch to the DEFAULT theme: Tools > Modules > themes).

    • Makes no changes on the start safe mode window.

    See:

  • Error message "press ENTER to align cartridges".

    PSC 2210: After having installed the new cartridge, message "press ENTER to align cartridges" will not disappear. Said HP blog Setup and hold and press Options, which does not work. HP technical support will not answer me and only offers to sell me a new printer for $99.00

    Now I am answering my own question. HP site does not say that the Options buttons and Setup must be kept pressed at the same time not independently. Now it works. It's all the support Tech had to say instead of trying to sell me a new printer and they would not. Nor would they say even here is the answer, pay US $20.00.

  • HP 15-g030so: the selected boot device has failed. Press ENTER to continue

    So, I got a disc error and had to go on my hard drive. After that, I was invited by a certain recovery of hp and tool that fussed around a while and rung me that he could not repair the system and some newspapers were stored. After that I tried to install win 8.1 running from a usb storage device that was the 8.1 software the installer of windows in it. Then the screen went black and I was promtped with "selected boot device failed." Press Enter to continue. "

    Any ideas on how to solve this problem?

    Problemi1 wrote:
    And now we're back to the original problem. I have an official version of windows 8.1 downloaded and formatted to a 8 GB USB by the official program from the official websites of microsoft. And just to clarify, it works with my pc. Now, when I try to start the installation in HP computer, it promots me with "selected boot device failed." Press ENTER to continue"and im the possibility of"boot manager"," Manager "start of the EFI file', who faced the same problem when I try to manually start the device and start"(yep 2 times). "»

    Hello

    Sorry to hear that.

    If you see boot and boot to the EFI file manager but nothing else, the USB is not detected.

    Please, perform the above steps

    s ' ensure that the 8.1 Win USB is intact and working

    -Secure Boot to disable and enable the Legacy mode

    -save changes and continue with the F9 mode.

    If it still does not respond, please take screenshots and join them in the next post.

    I hope this helps.

  • Err1err3 Boot failure Insert system disk and press enter

    OK lets see if you can crack this for me, it started a week ago for me. If I leave my computer on as usual, he would go on the eve, duh. BUT now it would not start up instead of this I have a black screen and reboot I go to the blue HP screen with four options. Well I have tried for some time and managed to get Vista back up...

    Well, after that it started to get really slow and started freezing up during my loadup office. Then, after many hours of scanning and research and reading aid, after a virus scan and even a system restore I couldn't understand the problem and I did what for me was the unthinkable...

    A COMPLETE FACTORY RESTORE... I wiped my computer with the possibility of returning to factory install settings. And for a while, that was good, that he has worked again... TIL yesterday I let go to the screen saver and then sleep mode while I was away, and what to do, I see but once more

    ERR1ERR3 Boot failure Insert system disk and press enter

    so clues as to why this is happening.

    PS right now YES I download the bittorrent to vista repair which had been suggested in another thread pray that it will work, but until it's done, I wanted to share this and ask for anyone who might have an idea of what caused it.

    Hello

    Run the diagnostics and the other utilities that I posted.

    ---------------------------------------------------------

    Starting from your startup disk COMMAND prompt, run these (you can run them in windows, but can be
    more efficient prompt startup disk so I will list two meanings).

    A boot disk command prompt

    Chkdsk /f /r

    RESET

    sfc/scannow

    RESET

    ---------------------------------------------------------

    Inside Windows - regular or Safe Mode

    Run checkdisk - schedule it to run at the next startup, then apply OK then restart your way.

    How to run the check disk at startup in Vista
    http://www.Vistax64.com/tutorials/67612-check-disk-Chkdsk.html

    Start - type in the search box - find command top - RIGHT CLICK – RUN AS ADMIN

    sfc/scannow

    How to analyze the log file entries that the Microsoft Windows Resource Checker (SFC.exe) program
    generates in Windows Vista cbs.log
    http://support.Microsoft.com/kb/928228

    --------------------------------------------------------

    Back UP your data NOW!

    Good luck.

    Rob - bicycle - Mark Twain said it is good.

  • Problems become more problems... DISK BOOT FAILURE, INSERT THE FLOPPY DISK AND PRESS ENTER

    I recently had a question on my toolbar menu and begin to disappear.  While I was trying a number of different ideas through forums, I myself in another problem.  Now my computer boots but windows never start I just get a screen saying: "FAILURE of STARTUP DISK, INSERT the DISK AND press ENTER.  It worries me because my computer never came with a CD-ROM it was all preloaded when I bought.  Can anyone help, thanks

    Home premium Windows Vista, 64-bit operating system

    Hello

    Here are the different ways to reinstall Vista

    Contact the manufacturer of the laptop computer and ask them to send you to vista recovery disks to reinstall the operating system back as it was when you bought it

    they do it for a nominal cost of $

    ____________________________________________________________

    also ask them if you have a recovery partition on your hard drive to get back to the way you bought

    you would normally press F8, F9, F10 or F11 or Alt + F10 or 0 to start to start the recovery process according to the manufacturer

    Ask them of the exact key sequence

    __________________________________________________________

    or borrow a vista microsoft dvd; not a HP, Acer recovery disk etc

    Make sure that you borrow the correct 32-bit or 64-bit microsoft dvd to your computer

    they contain all versions of vista

    This is the product key that determines which version of vista is installed

    http://www.theeldergeek.com/Vista/vista_clean_installation.html

    ____________________________________________________________

    How to replace Microsoft software or hardware, order service packs and replace product manuals

    http://support.Microsoft.com/kb/326246

  • Default system disk insert boot disk and press enter

    A few days I have installed additional return 2 GB ddr2 ram on my pc and a graphics card. My c: drive had only 700MB left. Then I turned off my PC. The next day, when I turn on my pc it shows the disk boot failure insert system disk and press ENTER. Then I tried to install windows 7 but it was impossible to install in this partition, this partition is type GPT. Then I used the command cmd and diskpart. Then I was able to install it. But then I tried to convert my GPT HARD drive using partition AOMEI converter. After that my pc restarts and again show the same command disk boot failure. Again, I have install windows 7 using cmd. Now, my pc works ok but it is quit slow. So what do I do now to solve this problem. And it will do no harm to my pc?

    Hello

    We are here to help solve your problem with Windows 7. While they inspected THAT TPG will work with a later version of Windows, i.e. Windows 8-10. You can see the last part of this link for more information.

    Let us know how it goes.

    Kind regards.

  • No shipment when press Enter in the Textfield - update in 4.2?

    Greetings to the community!

    There was this problem that unwantingly validates a page, when you press on enter a Textfield. (For example, you want to validate the input with javascript, but to give a proper error Usermessage.) -Even you you apply the option 'No. submit when enter' pressed in the point dialog box.

    We have a work around, you need to add a 2nd textfield to the page, so that this option takes effect. -Which seems to me not so much pleasant one solution.

    So I wonder about three things:

    (1) in Javascript, there is the function: e.preventDefault ();
    I tried this out, but its does not work. Can someone tell me, if it can't be applied in the APEX at all and for what reasons?

    (2) If you have a report interactive page, pressing enter this field research sometimes also submits the page. In order to have and a text field should stop the submission process. It still does not work. Can someone tell what to do against him?

    (3) are there any plans to change this problem with version 4.2?

    Honestly, I'm a little frustrated, because the validation of a Date with javascript entry - apex - without several other things happen that you don't want - it turns out that for one such huch hassle that I'm about to put up my own html input field plus my html button. But what's the point using APEX and with all its features?

    Thanks for all tips and best regards

    PS: our latest version of the Apex is 4.0.1 but we are about to upgrade to 4.2

    Hello

    This might help
    http://dbswh.webhop.NET/HTMLDB/f?p=blog:read:0:article:2525800346147859

    Please also read apodictus comment

    Kind regards
    Jari
    -----
    My Blog: http://dbswh.webhop.net/htmldb/f?p=BLOG:HOME:0
    Twitter: http://www.twitter.com/jariolai

  • How to set the default when button press "Enter".

    Hello

    I have a form, and he doesn't have that one button (send). When I press 'Enter', it can send the form and action. However, when I add another button (Normal button, not submit), it cannot run directly submit when I press "Enter".

    If you press 'Enter' and the form can submit automatically, it is more user-friendly than without this feature. Therefore, can I know the method to set the default button when users press "Enter"?

    At first I thought that can matter the order of the controls on the form.  When I run this code:





    While I am in the text box, if I press enter the form sends.  I tried originally with button and submit entries in the opposite direction.

    Note that the button enter will not submit the form if you are in a select command (aka dropdown) or a textarea component or if your home is not on a form element.  This is the default behavior.  If you want to replace, you write javascript.

  • Run the query by pressing enter

    Hi all
    I created 5 text and elements next to these 5 text elements that I created several text elements 5 that I want when I enter a numeric value in the text element, and next to that item, it displays string as values, I tried to use execute_query in Key_Enter trigger


    9999. after pressing enter the display in look-'Color' green element of the key it
    1000 yellow...



    Sarah

    Hello!
    First, remove the colon in front of *: ins1.beneficiary*.
    You select a block.item instead of a database column.

  • Turn off the text field (always submits page when you press enter)

    I have an area which allows you to enter search criteria. There are two fields and a button. The 1st field is a selection list that gives a list of columns in a database that can be searched on. The 2nd field is where the user enters the value to search for. The user can submit the search in 2 ways. They can press the button or press return when the cursor is in the 2nd item that is a text field (always submits page when you press enter). The results are then displayed in a region of report below.

    The problem I have, is that if the request is for > 10 seconds and the user gets impatient and hits the Enter key or the button search again the query is returned for a second time (or third or fourth according to the impatience of the user) causing the claim on the basis of data with a negative impact on the performance of the system.

    I know how to handle the search key. On a click event on I turn off the button so that the user cannot click on it again and resubmit the request.

    My question is - how can I turn off "always provides a page when you press enter" text item when the user presses enter? I tried an onclick event, but disabled the front element I could type in anything. Onblur event does not seem to do anything.

    Any ideas would be very appreciated.

    Andy

    Hello

    First of all, one thing to try: attributes of the Page, there is a section for the presentation in double - try setting this option on no.

    Otherwise, using the text field type, adds the following to the INPUT tag:

    onkeypress="return submitEnter(this,event)"
    

    which means, you can call your own function of javascript on the onkeypress event, the final line would be call submitEnter(). But you can set the value of a hidden page element:

    function doEnter(t, e)
    {
     if ($x('P1_SEARCH_RUNNING').value == 0)
     {
      $x('P1_SEARCH_RUNNING').value = 1;
      return submitEnter(t, e);
     }
     else
     {
      return false;
     }
    }
    

    Then, after changing your element to an element of normal text on the attributes of HTML form elements, add in:

    onkeypress="return doEnter(this,event)"
    

    Andy

  • Text field element submits the page when you press ENTER

    My page has
    -a 'text field' point
    -a 'Send' button (and a related branch, which works correctly).

    Management is working properly, when I hear some data for field text Item.
    and I press the submit button.

    I would like to the text field do the same action,
    When I press ENTER,
    After completing a few data for the text field.

    Currently, this does not work, and I get the following message:

    "ERR-1777: Page 121 provided no page at junction."
    Report this error to the administrator of your application.
    Restart the Application.

    I also tried the "(always present when the page Enter Presseds) text field" setting
    for the parameter "display as" Item.

    You can try my page at:
    http://Apex.Oracle.com/pls/OTN/f?p=9218:121

    Thank you very much
    Marios

    PS

    Make sure that the unconditional branch has a sequence number greater than all other branches - Apex will use the first part, that it can find which corresponds to the current situation. I tend to use 999 for the sequence numbers of the unconditional branches.

    Andy

Maybe you are looking for