Distinguish the wheel trackball click OS v4.1

I wish that my application for manage easily clicks trackball on devices, which provide a special touch to access the menu.  However, I still work on older devices on wheel, which is not a separate menu key.

To this end, I noticed that I can start by replacing the Screen.trackwheelClick () method.  However, I would like to find a way to tell the difference between the wheel and trackball clicks and do not use magic numbers in my code.

My own quick test found that the status of trackwheelClick() parameter is different on the two types of devices.  With a 7100t (wheel), its "17039360" and with an 8820 (ball), his "536870912.  If I converted to binary, the two following numbers look quite clean.  However, I prefer to use constant official APIs for my checks in trackwheelClick().

Any recommendations?

Hello

The substitution of Screen.trackwheelClick () is not recommended for various reasons, including the fact that it can be called internally by other events such as the invocation of the menu buttons, etc.

An elegant way to support/differentiate wheel vs. use of the trackball with a unique construction is to check the instance of the Screen.onMenu () event parameter. On a trackball device this value will be 65536 when it is clicked on the trackball or 1073741824 when the button main menu is used (default = 0 for devices on the wheel). So, you can implement your logic as below. This also has the effect that the menu will also be displayed in the correct location on the display depending on whether you click the main menu button (menu left) vs trackball (context menu, at the bottom) or menu knob (in the top right menu). You can of course replace one of these to the capture and the action just click (by wheel or trackball).

private final static int MENU_CONTEXT = 65536;
private final static int MENU_MAIN = 1073741824;

public boolean onMenu(int instance)
{
     if (instance == MENU_MAIN) //main menu button pressed, display menu bottom left
     {
          super.onMenu(instance);
          return false;
     }
     else if (instance == MENU_CONTEXT) //trackball click (context menu, display bottom) - override here
     {
            return openItem();
     }
     else //trackwheel click, display main menu top right (or override if required)
     {
          super.onMenu(instance);
          return false;
     }
}

Hope that helps,

James

Tags: BlackBerry Developers

Similar Questions

  • I let my child play with the computer, now when I click on a tab, it shows "(*)" to bottom of page, as the wheel of the mouse to zoom in and out and not scroll. I don't know how to fix it.

    I have let the child play with the computer. Now when I click on a tab it show (*) rather than to go to the tab, zoom on the wheel of the mouse rather that scroll and all links open a new window. How can I reset the settings to the default ones?
    Thank you.

    The reset Firefox feature can solve a lot of problems in restaurant Firefox to its factory default condition while saving your vital information.
    Note: This will make you lose all the Extensions, open Web sites and preferences.

    To reset Firefox, perform the following steps:

    1. Go to Firefox > help > troubleshooting information.
    2. Click on the button 'Reset Firefox'.
    3. Firefox will close and reset. After Firefox is finished, it will display a window with the imported information. Click Finish.
    4. Firefox opens with all the default settings applied.

    Information can be found in the article Firefox Refresh - reset the settings and Add-ons .

    This solve your problems? Please report to us!

  • To disable the wheel click mouse 2000

    I have an optical mouse Microsoft 2000. I want to deactivate the ease by which I click on the wheel and everything move the walls everywhere.

    Hello

    I would say contact Microsoft Hardware support section:

    Follow the Contact link:

    http://www.Microsoft.com/hardware/en-us/support

  • How can I achieve simple click on the wheel automatically oepns message

    Hi all

    I want to do exactly what blackberry for messages from the SMS Inbox. I create a folder to view the SMS received as SMS Blackberry Inbox.

    I created the Inbox / sending of messages for the TEXT box. When I click on the wheel, he opens all the menuItems. But I want to oepn a message directly from the message selected like what did Message SMS Blackberry. Click on the wheel how open a message directly, it should not show the MenuItems. In the Inbox / Outbox messages, I show first row I'm stating the date of the Message and their correspondents. If I select a message I want to display the information in message directly, if I select the Date in the list I want to show the corresponding MenuItems.

    Please can someone help me in this issue. can any send a code for this example.

    Thanks in advance.

    You can override trackwheelClick in your field to view your messages.  In this method, you can view the element of the method of their choice, when selected and return true to indicate that you have consumed the event.  If you always want to display the menu, return false and the menu should always be displayed.

  • Hide a full menu with a click of the wheel

    Hello

    I have not created any menu in my application.

    I dynamically add a button to the screen using this code:

    ButtonField getDetailsButton = new ButtonField("See details", Field.FOCUSABLE | Field.FIELD_RIGHT);                        getDetailsButton.setChangeListener(new FieldChangeListener() {public void fieldChanged(Field field, int context) { ((CampaignManagementScreen)field.getScreen()).requestInfo("test");}});
    

    Problem is, when I click on a button by using the wheel, displays a context menu with a "menu" element Then, my action is executed normally. Don't you know that I can get rid of this menu?

    Thank you

    You must set the CONSUME_CLICK style in your buttonfield constructor.

  • BlackBerry smartphones, sending a message on my 7130e WITHOUT clicking on the wheel.

    Can someone help me find the key combination to SEND an e-mail or text without the wheel as my knob is broken

    Thank you

    MIK

    There is no keyboard shortcut to send the message.

    Only via the click wheel.

  • Wheel/Trackball JDE 4.1

    All,

    I know this is an old topic, but I still have to find a solution that works.

    I developed an application that must run on devices both wheel and trackball. Because the wheel devices running OS 4.1, according to RIM, I have to use the JDE 4.1.  Unfortunately the trackball is not supported until the JDE 4.2.

    I built a screen that extends screen and adds a HorizontalFieldManager, which has a number of VerticalFieldManagers added to it so that I can display a table of data in format rows/columns (essentially following the example of the RIM on the way to display a data table).  To view my data I created an array of LabelFields, auditor trackwheelRoll and the setFocus() to allow custom movement when you move horizontally between the VFMs (this avoids to go to the first/last field in adjacent resources optimization).

    As you'd expect, the trackwheelRoll listener knows nothing trackballs and can't handle the identification of horizontal movement.  Instead, the code of the default RIM intervenes and automatically move to first/last field of adjacent resources optimization.  Trackball users a frustrated because the movement between the VFMs is very frustrating to keep track where you were at prior to the move.

    I know it's hard to explain and code sample would be quite long, but if necessary, I'll post a code.

    Anyone found any way to support the trackball in the JDE 4.1 environment?  RIM suggested to manage the movement of the trackball when the user clicks on the ball/menu key, but this does not allow me to move to specific areas within an optimization of adjacent resources I need.

    I looked at the FlowFieldManager, but I don't know that it will allow me to move horizontally and vertically beyond the limits of the visible screen (by default the FlowFieldManager will only scroll vertically and only generate fields horizontally that adapts to the screen that is not desired).

    Proposals and guidance would be greatly appreciated.

    fbwing

    One solution is to create the version of the wheel of your app in the BlackBerry JDE 4.1 version and then use version 4.2 BlackBerry JDE to take advandtage the navigation methods.

    This would require the maintenance of the two versions of the source to your screen and have the users to install the correct version of the application.

  • What is the wheel yellow in the left margin of the subject field of the thread pane?

    Today, some, but not all of the unread mails had a small symbol yellow like the Sun wheel in the left margin of the pane Inbox thread.
    The symbol appears in the same area where the other e-mails can have small arrows indicating that I responded to an email.

    When I click on a such mail, it goes to State reading (normal font as opposed to "BOLD"), and the wheel also goes.

    While trying to ask this question, I had to request a reset password, and after you receive that mail, the last unread message remaining which had this wheel, had more of her. I am therefore unable to make a screenshot showing the symbol. However, it consists of a circular yellow box with a large number of short black lines in the radial direction, places evenly along the perimeter inside the yellow box, forming a ring or radial lines.

    If you know the symbol, what you call it? What he's trying to say?

    In which case it is important, I use an IMAP account.

    Looks like it's the new message indicator when using threads messages.

    List icons.
    http://KB.mozillazine.org/Icons_-_Thunderbird

  • How to open new tab without leaving an old using the wheel mouse

    Until yesterday, I was able to click on a link using my wheel. It would open up a new tab without leaving the tab, in that I was. Now, when I click on the wheel, he left the former tab and going to the new. As if I had used my left button. I hope that I can return this option. It is very convenient.

    Hi Vicky, you can check the setting in Options to make sure that it is what you want:

    "3-bar" menu button (or tools) > Options > tabs

    Disable this box: "When I open a link in a new tab, switch to it immediately."

  • Using a mac OSX and mouse logitech M-UAG120, how to use the wheel button to open a link in a new tab (but not switch to him)? Cannot type a key in the box.

    In the logitech control center, I clicked my mouse (mouse wheel tilt), clicked on 'roulette' and in the combination of keys selected menu dropdown. Under 'configure strike', there is a box «enter a key...» ", and to the right, there's a selection of"choose a modifier.

    On this web page, http://www.accessfirefox.org/Firefox_Keyboard_and_Mouse_Shortcuts.html, the instruction to "open the link in a new tab" is Cmd + enter Cmd + click

    On this page, https://support.mozilla.org/en-US/kb/mouse-shortcuts-perform-common-tasks, the instruction for 'open link in new tab' is command+Left-click link   Middle-click link
    

    I can't understand how to type correctly for that function.

     Help please?
    
     Thank you all.
    

    Hello again!

    You can send the question to Logitech customer support and otherwise reinstall the Logitech software again or reset factory default driver software, as I don't know any more than the problem lies in the web browser itself.

    If all above fails them, try and see if you can get the mouse works propely on other computers running the same version of Mozilla Firefox.

  • My iMac has been slain on the wheel that turns for hours after I entered my Apple ID in the Setup

    My iMac has been slain on the wheel for hours after I entered my Apple ID in the installation program do I do?

    Hold the power button until the screen goes black.

    Wait at least 10 seconds, then press power once to turn back on.

    If you still have problems, boot in Safe Mode boot Safe Mode.A removes the system caches that can help.

    Upper left corner of your screen, click on the Apple  > Shut Down.

    After your Mac stops, wait 10 seconds, then press the power button.

    As soon as you hear the startup tone, hold down the SHIFT key. You must press the SHIFT key as soon as possible once you hear the startup tone, but not before.

    Release the SHIFT key when you see the gray Apple logo and progress indicator.

    Once you are in Mode without failure, return to the menu Apple . In the drop-down list, click: reboot

    On Safe Mode

  • Configuration of the wheel of the mouse to NOT Flip 3D

    OS: Edition Vista Home Premium

    Mouse: Microsoft Standard Wireless (office 1000)

    The 'failure' for support on the wheel is the Flip 3D Vista between various programs.

    Via Control Panel > mouse there is a drop down menu to change this default value.  There is also a method to change these options on a program specific basis.  However, the "set default" option is not available.

    I'm wanting to do the Flip 3D in a CAD drawing program.  The default value of the program is the 'hand' that will pan the drawing on a temporary basis - while that depressed.  Therefore, do not have to manually change the order.  However - this 'feature' of Vista is the substitution of the program.

    Any ideas on how to restore this vital function of the writing program, and not the default in Vista?

    Unfortunately, this is not possible.  It might be possible if you completely disable pressing scrool to the mouse wheel functionality (if that's even possible - check the properties in the start menu / Control Panel / mouse), but the mouse will replace the controls program and there is no way around that unless the mouse controls allow these one option apparently they do not.  You can check to see if there is uppdated drivers available and maybe they offer more options as you want.

    Sorry if this isn't what you wanted to hear, but it's like that.

    I hope this helps.

    Good Luk!

    Lorien - MCSA/MCSE/network + / has + - if this post solves your problem, please click the 'Mark as answer' or 'Useful' button at the top of this message. Marking a post as answer, or relatively useful, you help others find the answer more quickly.

  • BasicEditField the cursor with the wheel of trapping

    Hello

    I created a customized to handle the keypress TrackballClick and Enter BasicEditField.

    It works very well on blackberry with a trackball (latest), but the cursor is trapped in the field with Blackberry with a wheel (like the 8703e). As soon as it gets the focus, the cursor may not go out (or an upper field) or one of the below

    Here is the code:

    public class SearchInputField extends BasicEditField implements TrackwheelListener {
        ConnectionScreen parentScreen;
    
        public SearchInputField(String label, String initialValue, int maxNumChars, long style, ConnectionScreen screen) {
            super(label, initialValue, maxNumChars, style);
            this.parentScreen = screen;
        }
    
        public int getPreferredWidth() {
            return Display.getWidth() / 2;
        }
    
        public boolean keyChar(char key, int status, int time) {
          switch( key ) {
            case Characters.ENTER:
                parentScreen.PerformSearch();
                return true;
            }
            return super.keyChar(key, status, time);
        }
    
        public boolean trackwheelClick(int status, int line) {
            parentScreen.PerformSearch();
            return true;
        }
    
        public boolean trackwheelUnclick(int status, int line) {
            return true;
        }
    
        public boolean trackwheelRoll(int amount,int status, int line) {
            return true;
        }
    

    Any idea?

    Thank you

    No, he stayed in the first.

    In any case, fixed it by returning false in the method of the wheel (do not know why, but anyway... )

  • Distinguish the event log device

    Hi all

    I'm getting errors in the log of events of a machine as follows:
    The driver has detected an error of the controller on \Device\Harddisk5\DR5.
    I'm trying to identify the device causing this error.  I looked in the support article "how to distinguish between a peripheral drive of year physical Message event" http://support.microsoft.com/kb/159865?wa=wsignin1.0
    The problem I have is that I don't currently have physical access to the machine, so I can't simply open Device Manager to take a peek and the method using the registry does not seem to apply to Windows 7.  I have no other options or will at a distance, I have access to the system have a look.
    Thanks for the help

    Hi André,.

    Error: Device\Harddisk5\DR5, DR means a removable drive. So please check the USB device, or remove and reconnect all USB devices.

    This problem occurs when all the following conditions are true:

    (a) you have a removable drive, such as an Iomega Zip drive, configured as the drive letter C.

    (b) you don't have a removable disk in the removable disk drive.

     

    Let's change the assignment of drive letter for the removable drive to one letter other than C:\.

    a. log in the computer as an administrator.

    b. Insert a disk in the removable drive.

    c. type computer management in the start search box and press ENTER.

    d. click on disk management.

    e. right-click the partition, logical drive or volume that you want to change and then click on change drive letter and paths.

    f. click on the removable drive, click it, click on change, click the drive letter that you want to use, and then click OK.

    If the above is not enough, you need to connect only one device at a time to identify which device is causing the error.

    Hope the above information is helpful.

  • I'cant connect. The wheel continues to roll and never connect. Internet works fine.

    I'cant connect. The wheel continues to roll and never connect. Internet works fine.

    If you are still having the same issue, follow the procedure below and check it once.

    N ° 1)

    Temporarily disable anti-virus and firewall.

    Step 2)

    (1) open Control Panel and then click on the network and Internet"" option.

    2) click on Internet options, click on the tab "connections".

    (3) in the 'Connections' tab, select 'LAN' settings, you will be able to view the LAN settings box.

    (4) check the box-"automatically detect settings" and then "uncheck" all the other boxes as "configuration Script auto use", "Use a proxy server," proxy server ", then click on the ok button."

    5) click on the "Network settings" button once again, make sure that "Automatically detect settings" is the only option you select, the window of properties of LAN so clear.

    Step 3)

    Complete all Adobe processes as creative cloud, CoreSync, AAMUpdater... etc from the Task Manager.

    Press Windows button (located between Ctrl and Alt buttons) with the key R together at once, you will get a command window.

    Type below command and press the enter"" key.

    AppData

    It will open the Appdata folder.

    Then navigate to local > Adobe > OOBE. Open the OOBE folder and delete "' Opm.db ' file."

    Once you had deleted Opm.db file, launch Adobe Creative Cloud application and try to connect again.

    Always the same?

    1) go to C:\Windows\System32\drivers\etc and locate the file named Hosts inside the folder etc.

    Copy 2) host of the file to the desktop and open the same with Notepad.

    Check if you can see all Adobe related as entries in the Hosts file 127.0.0.1 activate.adobe.com... etc?

Maybe you are looking for

  • Main apple removed apps?

    I was asked to get new applications and I went to the app store, but it is deleted. Any help?

  • My laptop stops with a blue screen

    HelloI'm french. My computer randomly with a blue screen stop.The error is BCCode: 3B It reboot.

  • HP 250 G4 Notebook: could not find the driver of BCM43142A0

    I am trying to install drivers from Windows on a laptop HP 250 G4 8.1. I tried to install all the drivers support > drivers and software on the site, but not all drivers seem to be compatible with this laptop. In the Device Manager only the BCM43142A

  • Protection Internet keeps popping up, saying: I have 18 virus

    I get pop up messages of 'Internet Shield', saying: I have 18 virus and when I run a scan everything is clear, I can not get this icon on the desktop or can not get rid of popups, I keep getting pop ups saying new database updates are also available,

  • Windows Explorer stopped working

    I had OOVOO on my PC. When I clicked on this subject recently, I was suggested to download the last update, I did. After that, I'm not able to access anything on my desk (Control Panel, my documents, even the trash) with the exception of Internet. Up