keyDown replaces all other keys
I want to capture some pressure on keys, so I can use the keypad as a "controller" of sort... but I want that all the other buttons to act as usual.
How would I go to do this?
//this manager is used for the static background image mainManager = new VerticalFieldManager( NO_HORIZONTAL_SCROLL | NO_VERTICAL_SCROLL ) { protected boolean keyDown(int keycode, int time) { try { if (keycode == 5701632 || keycode == 5701666 || keycode == 5701633) { } else if (keycode == 4521984 || keycode == 4521985 || keycode == 4522018) { } else if (keycode == 5373952 || keycode == 5373953 || keycode == 5373986) { } else if (keycode == 5439488 || keycode == 5439489 || keycode == 5439522) { } else if (keycode == 4456448 || keycode == 445644 || keycode == 4456484) { } else if (keycode == 4587520 || keycode == 4587521 || keycode == 4587554) { } else if (keycode == 5898240 || keycode == 5898241 || keycode == 5898274) { } else if (keycode == 5767168 || keycode == 5767169 || keycode == 5767202) { } // blackberry button else if (keycode == 268566528) { } // red button else if (keycode == 1179648) { } // back button else if (keycode == 1769472) { } } catch (MediaException e) { // TODO Auto-generated catch block e.printStackTrace(); } return true; } protected boolean keyUp(int keycode, int time) { return true; } };
Or do I actually code for all the other buttons?
Hi footose,
You must return false, if the key was not consumed by your method, in order to tell the system that the key should be covered in more detail. Means, in your structure, you should return true if the key was one you expected and treats you to false otherwise.
You may want to consider implementing your if structure like a switch-case structure. Is better to read afterwards for maintenance.
Kind regards
Carsten
Tags: BlackBerry Developers
Similar Questions
-
Hello
I've explained the problem that is described in detail in the following thread, please read full for understand what is the problem.
http://www.wincert.NET/forum/topic/11021-SanDisk-Extreme-30-32GB-cant-go-on-at-install-destination/
In short:
The problem is in the stage of Windows where you select the partition to install it's unpossible click Next:
An error message appears that says: cannot find any partition or create an install for... but the hard drive is visible and its also possible to create and delete partitions, so the error message is bull * beep *.
My thougth is that sandisk stick is detected as disk sata hard and is internally by mistake folders as first hard disk, if I get out the stick at the stage where I select the partition, click Refresh, reconnect the key, other refreshment so I can install on the hard disk.
What is the problem with your extreme poles? Any other key usb 3.0 works well.
To pull the stick and so on is just a workaround dirty, I bougth the stick because of the speed!
Greetz X 23
Hello
Nobody talked about windows to go...!
You didn't read the linked thread right?
To please you, and then you might think about your answer.
You will find the most important information on page 3, if you
don't have the time to read them all.
EDIT:
dotfusion, on 27 Feb 2013 - 23:21, said: @x23piracy, I have searched high and low for more more information ob this odd behavior. But all i can find is either not reliable or solutions such as the one tried. No real reason as to why or what is the problem. I suspect it has something do to with the way the partition tables are setup on the source media (in this case a san disk usb drive.) I would start there. amaltom61, on 01 Mar 2013 - 12:41, said: I had the same problem with a 2.0 8 gb drive. I found a fix on the net, Just create about 150 mb or more of unallocated space in the hdd or ssd you are trying to install windows Resizing a partition would do the trick but do a full back of the drive just in case Stimpy, on 01 Mar 2013 - 17:12, said: Windows setup will run a refresh on the USB bus at the point that you are having problems with. One way to get around it, is to pull the USB disk out, then put it back in, and go back one step of Windows setup, and try again. This works in most cases with this error. bphlpt, on 01 Mar 2013 - 17:15, said: The questions remains. Why is this happening with this particular brand/size of USB stick while it is not happening with others, and how to prevent this behavior? Cheers and Regards Stimpy, on 01 Mar 2013 - 18:46, said: It's a good question. I also own the same drive, and have the same issue with it. I have a feeling that the controller in the stick is slow at initializing, and is simply not fast enough for Windows Setup. If you watch the USB stick when Windows is setting up, you can see that it's being initialized, (just before setup asks what drive you want to install Windows on) as my mouse and keyboard also disconnect and reconnect at the same time. amaltom61, on 02 Mar 2013 - 13:05, said: Stimpy can be correct. One way i found to solve this problem is to create some unallocated space in the drive(150 mb or more). bphlpt, on 04 Mar 2013 - 08:00, said: Even though you weren't talking about that, I don't know why it wouldn't work. I've reformatted them before, Fat32 and NTFS. OK, I went looking for references. Yes you can do it, but it seems it is not as easy to do as I thought, at least for everyone. Some folks say the standard built-in Windows 7 tools do it automatically, some say they don't. I still haven't tried it, since I don't have a USB stick available to partition at the moment. Some references say that that you need to flip the USB removable bit so that Windows will see the stick as a fixed drive before you can partition it. I also found two different tutorials or how to partition a USB stick here and here. So, yes, one way or another it can be done. Cheers and Regards Stimpy, on 04 Mar 2013 - 16:59, said: Yeah, I have looked in to this a while ago. And found that you cannot partition this USB stick. It needs to be seen by the system as a fixed drive, but for whatever reason, Sandisk are not interested in helping their customers out with this, as it is a simple change to the drives firmware, like you described. There is a rumour going round that Sandisk are going to realease an updated firmware that will make this drive compatible with Windows To Go, and turn it into a fixed disk. I think that's unlikely, but you never know! Have a look here, it seems Sandisk support simply does not care.
Greetz X 23
-
InDesign script for a text of color replace all other lines in a text box
I have a very long list of names I need to alternate the color CMYK, all other rows value.
changing the hue of every 3rd line:
var i, p; for (i=0; i<app.selection[0].paragraphs.length; i++) { p = app.selection[0].lines[i]; if (i%3 === 2) { p.fillTint = 50; } }
I tried to change the script to change the value of CMYK, do this:
var i, p; for (i=0; i<app.selection[0].paragraphs.length; i++) { p = app.selection[0].lines[i]; if (i%2 === 1) { p.colorValue=[0,100,100,0]; } }
But using 'colorValue' is not supported. How can I change the script to do all the other lines in a text box to change the value of the color?
var i, p, color; for (i=0; i
-
Find/replace all other cases
I have a lot of numbers that I copied from Excel - they are separated by tabs, and returns, and I want to turn them into a table.
My problem: I want to replace any other tab character and automate this process if possible.
example - I want that:
1.02 25.9 [TAB] [TAB] [TAB] 0.61 15.5 [TAB] 0.90 [TAB] 22.9
1.08 [TAB] [TAB] 27.4 0.64 16.3 [TAB] [TAB] 0.92 [TAB] 23.4
(where [TAB] is actually a tab character)
to look like this:
1.02 (25.9) 0.61 (15.5) [TAB] [TAB] 0.90 (22.9)
1.08 (27.4) 0.64 (16.3) [TAB] [TAB] 0.92 (23.4)
Is it possible to use find/replace to replace each other tab with a "("?) "
Thanks in advance,
Mike
mikeborgsdorf wrote:
Is it possible to use find/replace to replace each other tab with a "("?) "
Sure! GREP mode, search
(\d+\.\d+)\t(\d+\.\d+)
and replace with$1 ($2) -
dominant touch event handler replaces all other fields
I have the code following, which uses gestures to perform scrolling on my hfm, but substitution of this hfm, replace essentially all fields on the screen, making them useless. How is this possible, I thought that this specific touchEvent belonged to the hfm? How to work around this problem and just disable scroll for the hfm?
gallery = new CustomHFM(){ protected void sublayout(int maxWidth, int maxHeight){ super.sublayout(maxWidth, 200); setExtent(maxWidth,200); } protected boolean touchEvent(TouchEvent message){ int eventCode = message.getEvent(); if(eventCode == TouchEvent.GESTURE){ System.out.println("SWIPE GESTURE"); TouchGesture g = message.getGesture(); int gesturecode = g.getEvent(); int direction = g.getSwipeDirection(); //gallery.setHorizontalScroll(page_two, true); if(direction == TouchGesture.SWIPE_WEST) slideNext(); if(direction == TouchGesture.SWIPE_EAST) slidePrev(); pressed = true; } if(eventCode == TouchEvent.UP){ pressed = false; //slide(); } return true; } };
I want to just do not use the default scroll and do my own thing! Any suggestion would be appreciated, I'm really in the fire right now.
OK, this is a different problem. I suspect that you must reject touch events that are not actually within your HFM. Then add code like the following at the beginning of your touchEvent method:
int x = message.getX (1);
int y = message.getY (1);
If (x < 0="" ||="" y=""> < 0="" ||="" x=""> getExtent () .width: y > getExtent () .height) {}
Outside the scope
Returns false;
}If this is not enough, so be sure that your touchEvent method is called. If it really is, then I think you have a problem with a Manager. You have all Directors complicated on your screen. Try to simplify the screen so that you don't use native components RIM (and nothing implying positioning as AbsoluteFieldmanager and see if the problem persists.) If so, then see if you can post an example of the sample that shows the problem so that we can all try.
-
Telephone number Facebook replaces all other contact phone numbers
The title pretty much everything said.
I have a facebook contact who has added their phone number to facebook. This phone number is only available when you view the contact through the contact application and when typing his name in the phone app. Because the number is wrong, I can't call!
I tried to add additional numbers, nothing helps...
Help! How can I change the default phone number?
Just made a discovery: apparently, the algorithm used by webOS to detect the same GSM number is simplistic.
I added a leader + on the phone gmail is hidden the number and all of a sudden, the phone number of gmail has resumed and the number of facebook.
This solved my problem, but the behavior of webOS is still very strange. I expect to be able to choose among all the available numbers for a contact.
-
Table of files - last item replaces all others - SEO problem
I use the following structure: Applet-> MasterFile-> DirectoryFile-> file
now simply file consists of:
public class File { private byte[] aid; public File (byte aid[]) { this.aid = new byte[(short) 6]; Util.arrayCopy(aid, (short) 0, this.aid, (short) 0, (short) 6); } public byte[] getAID() { return aid; } }
DirectoryFile for the moment only this:
public DirectoryFile(byte[] aid) { super(aid); }
now in the main folder, I have a class addDF to add a new DirectoryFile to a predefined DirectoryFile table (I omit the constructor is easier to read):
byte numApp; // number of applications DirectoryFile[] arrayDF = new DirectoryFile[8];// 8 possible applications // constructor public byte addDF(byte[] aid) { numApp++; arrayDF[numApp] = new DirectoryFile(aid); return numApp; }
and in the real applet I add a DirectoryFile for the main folder as follows:
MasterFile master; numApp = adfptse.addDF(aid); apdu.setOutgoing(); apdu.setOutgoingLength((short) 24); for (byte i = 2; i <= numApp; i++) apdu.sendBytesLong(master.arrayDF[numApp].getAID(), (short) 0, (short)
For the moment, I just want to print all aid recorded so far in the table.
For the first call with for example. AID = A10101010101 it simply responses to AID
Now when I call later with AID = B20202020202 it answers with B20202020202 B20202020202... so I guess I'm only referring to a place and by adding a new AID, I also changed the referenced.
Since I can't clone an array in java card I don't know what else to do to make this work!
Hello
It looks like a problem with indexing in a loop.
I think in the next line,
"apdu.sendBytesLong (master.arrayDF [numApp] .getAID ()...". "it should be 'I' instead of 'numApp' and 'i' should start from"0"loop.
If it's not wrk giv SMEs more details of the code if it can be shared.
ARO
PPT
-
How to replace all the Bridge CS6 Stock keywords with Bridge CS5 keyword
I have CS6 working in a computer other than the one which houses the CS5. CS6 bridge can read CS5 keywords when it opens a 'old' photo but there not his own (not counting the stock of those supplied with the program). How can I replace all keywords CS6 stocks with the key words of CS5?
Have you tried the Import/export options in the little menu in the top right of the keywords Panel?
-
Recently my yahoo mail is open in the sidebar, or it opens as a full tab, but is overlaid on all other tabs and the only way I can get the other tabs is to close the overlay of yahoo mail. There are no controls showing except upper-left, it says YMail (and YMail how I listed in the menu bar if it is affecting any) and on the right is an X.
So, basically, I can't keep my mail open in a tab and do something else. I hit probably just a strange combination of keys, or it could be something with the last update (ff39) but I don't know how to get back to normal. He isn't past with other tabs or bookmarks.
I did some research and could not find an answer. I opened with all add-ons disabled in safe mode, but the problem was still there. When I click on the side bars 'show' that is not listed (just bookmarks and history) so I can't uncheck.
Anyone have any ideas? It's just a nuisance, but I'd love to have solved it. Thank you.
With regard to the opening in the sidebar:
The most common reason for this is a bookmark that has been added directly by a Web site. Due to restrictions on the operation of the websites with bookmarks, these usually have an option configured to open in a sidebar.
To correct this:
Right-click on the bookmark > properties
Then uncheck the box at the bottom to "load this bookmark in the sidebar".
What is fix?
In regard to be superimposed on the other tabs:
I can't imagine that. Is the site to go full screen? The F11 key toggles between full-screen and regular view mode. If the Web site generated a full panel screen, generally the ESC key will return to normal.
If you see this once again, you might experiment with these keys.
-
I just upgraded to 25.0 FireFox and I have problems of visualization of Google ads and Facebook comments and love on my site (wellfitstyle.com). All other browsers show Google adds comments in the right sidebar and Facebook and like below each post. Many people in Eastern Europe (where I am) using FireFox and I would like to know how this problem can be solved.
TNX.
Try Firefox Safe mode to see if the problem goes away. Safe mode is a troubleshooting mode, which disables most of the modules.
(If you use it, switch to the default theme).
- Under Windows, you can open Firefox 4.0 + in Safe Mode holding the key SHIFT key when you open the desktop Firefox or shortcut in the start menu.
- On Mac, you can open Firefox 4.0 + in Safe Mode holding the key option key when starting Firefox.
- Under Linux, you can open Firefox 4.0 + with leaving Firefox then go to your Terminal and running Safe Mode: firefox-safe-mode (you may need to specify the installation path of Firefox for example/usr/lib/firefox)
- Or open the Help menu and click on the restart with the disabled... modules menu item while Firefox is running.
Once you get the pop-up, simply select "" boot mode safe. "
If the issue is not present in Firefox Safe Mode, your problem is probably caused by an extension, and you need to understand that one. To do this, please follow article Troubleshooting extensions, themes and problems of hardware acceleration to resolve common Firefox problems .
To exit safe mode of Firefox, simply close Firefox and wait a few seconds before you open Firefox for normal use again.
The report please come back shortly.
-
Whenever I want to open my history (CTRL + H) or Favorites (CTRL + B), I use these commands. They have always worked. Yesterday, they mysteriously stopped working. All other commands CTRL + KEY still works perfectly.
I did not anything out of the ordinary in the last few days, and I tried to restart my computer. What could be the cause of this?
Thank you.
Wow - I restarted it in safe mode, opened again normally and CTRL + H and CTRL + B running again.
I don't know why, but it worked. Thank you.
-
All the keys do things randomly or not working do not at all
The MacBook is only 6 months old. The keyboard behaves strangely. The key doesn't work at all, and many other keys do different other things only advertised on the key! For example, the H key is RET...! Intermittently, the works of the SHIFT key (next to (A) are another example. I have to take this back to the Apple Store do you think?
Thank you
Wait, is this a macbook or a macbook air?
-
I got am HP Pavilion 17-e049wm Notebook PC product #E0J75UAR for about 4 weeks now. I bought it refurbished. A week ago I started having this problem. 3, e, d and c keys do not work when I first start the computer all of the other keys work. Nothing happens when they are pressed. Sometimes I will restart the computer and they work again, other times they won't, but often will start working if I left the computer set for about five minutes after the start.
The computer is spotlessly clean. I've only used a dozen times or more. Nothing has been spilled on the keyboard.
Sounds like software for me, but what?
I am running Windows 8.1 and no programs are running at startup, with the exception of a program start button, but the problem began weeks after installing that.
Any ideas?
FWIW, I called hp. They believed excluded material and had me do a full system restore. Problem persists... The things you own end up owning you they say... I guess it's doubly true if you own a hp laptop. Full day turned... One day closer to death. Thanks Obama.
-
Without any input from me, my Inbox went to 12 April. All other folders, deleted items still contains items deleted two weeks ago sent items and folders are still there intact. There is an Inbox.dbx file, which is a great, this could be where they were and how to open it?
Two reasons the most common for what you describe is disruption of the compacting process, (never touch anything until it's finished), or bloated folders. More about that below.Why OE insists on compacting folders when I close it? :
http://www.insideoe.com/FAQs/why.htm#compact
Why mail disappears:
http://www.insideoe.com/problems/bugs.htm#mailgoneRecovery methods:If you are running XP/SP3, then you should have a backup of your dbx files in the Recycle Bin (or possibly the message store), copied as bak files.To restore a folder bak on the message store folder, first find the location of the message store.Tools | Options | Maintenance | Store folder will reveal the location of your Outlook Express files. Note the location and navigate on it in Explorer Windows or, copy and paste in start | Run.In Windows XP, the .dbx files are by default marked as hidden. To view these files in the Solution Explorer, you must enable Show hidden files and folders under start | Control Panel | Folder options | View.Close OE and in Windows Explorer, click on the dbx to the file missing or empty file, then drag it to the desktop. It can be deleted later once you have successfully restored the bak file. Minimize the message store.Open OE and, if the folder is missing, create a folder with the * exact * same name as the bak file you want to restore but without the .bak. For example: If the file is Saved.bak, the new folder should be named saved. Open the new folder, and then close OE. If the folder is there, but just empty, continue to the next step.First of all, check if there is a bak file already in the message. If there is, and you have removed the dbx file, go ahead and rename it in dbx.If it is not already in the message, open the trash and do a right-click on the file bak for the folder in question and click on restore. Open the message store up and replace the .bak by .dbx file extension. Close the message store and open OE. Messages must be in the folder.If messages are restored successfully, you can go ahead and delete the old dbx file that you moved to the desktop.
If you have not then bak copies of your dbx files in the Recycle Bin:DBXpress run in extract disc Mode is the best chance to recover messages:
http://www.oehelp.com/DBXpress/default.aspxAnd see:
http://www.oehelp.com/OETips.aspx#4A general warning to help avoid this in the future:Do not archive mail in default OE folders. They finally are damaged. Create your own folders defined by the user for mail storage and move your mail to them. Empty the deleted items folder regularly. Keep user created folders under 300 MB, and also empty as is possible to default folders.Disable analysis in your e-mail anti-virus program. It is a redundant layer of protection that devours the CPUs, slows down sending and receiving and causes a multitude of problems such as time-outs, account setting changes and has even been responsible for the loss of messages. Your up-to-date A / V program will continue to protect you sufficiently. For more information, see:
http://www.oehelp.com/OETips.aspx#3And backup often.Outlook Express Quick Backup (OEQB Freeware)
http://www.oehelp.com/OEBackup/default.aspx -
Thank you for your advice in this thread http://answers.microsoft.com/en-us/windows/forum/windows_xp-windows_update/why-does-security-update-for-microsoft-office-xp/fa6c7729-c772-e011-8dfc-68b599b31bf5 . I have Microsoft Office XP Service Pack 3 installed on my coimputer and I am able to install all other updates Microsoft except this one (Office XP (KB2289162). I tried your suggestion to turn off my antivirus and then install the stand-alone package. However, it is still impossible to install. This time, I receieved an error message referring to the lack of permission to make changes in Microsoft Office Small Business Edition (which is the version of Office that I have). I don't know why this would be the case, since I have never had a problem with update of Microsoft Office in the past.
If you or someone else has other suggestions, I'd appreciate them.
Thank you.
Hi Mike,.
Thanks for the reply, the steps were actually written originally for Windows XP and are still valid. As you can see in the SubinACL download it is designed to work in all versions of windows. The indications in the thread (also posted here) should help you reset the permissions problem. Once again, the reason for which we do, it's because the update fails to install due to permissions on some files/registry values. Rather than browsing manually, then find the specific that does not respect these steps reset them to the default settings and must
1 download subinacl.msi from following link and save it to the desktop.
http://www.Microsoft.com/downloads/details.aspx?FamilyId=e8ba3e56-d8fe-4a91-93Cf-ed6985e3927b&displaylang=en#AffinityDownloads (http://www.microsoft.com/downloads/details.aspx?FamilyID=e8ba3e56-d8fe-4a91-93cf-ed6985e3927b&displaylang=en#AffinityDownloads)
2. on the desktop, double-click subinacl.msi to install the tool.
3. Select as destination folder C:\Windows\System32.
Note This step assumes that Windows is installed in C:\Windows. If Windows is installed elsewhere, select the path appropriate to \System32.
4. open Notepad.
5 copy the following commands, and then paste them into the open window of the notebook .Subinacl /subkeyreg HKEY_LOCAL_MACHINE/Grant = administrators = f
Subinacl /subkeyreg HKEY_CURRENT_USER/Grant = administrators = f
Subinacl /subkeyreg HKEY_CLASSES_ROOT/Grant = administrators = f
Subinacl % lecteur_systeme % /subdirectories / Grant = administrators = f
Subinacl /subkeyreg HKEY_LOCAL_MACHINE/Grant = system = f
Subinacl /subkeyreg HKEY_CURRENT_USER/Grant = system = f
Subinacl /subkeyreg HKEY_CLASSES_ROOT/Grant = system = f
Subinacl % lecteur_systeme % /subdirectories / Grant = system = f6. in Notepad, click file, record underand then type:reset.cmd
7. in Notepad, click Save as type, and then select all files (*. *).
8. save the reset.cmdfile on your desktop and close Notepad.
9. double-click on the reset.cmdfile to reset permissions in Windows Update.
Note This step can take several minutes, so please be patient. When permissions have been reset, you will be prompted to "finished, press any key to continue."
10. Press any key to finish the installation.resolve this question.
Maybe you are looking for
-
In 2008, I studied the heart rate, swimming speed and the time relationship developed software to assess the effects of the training. At that time, we needed a HR-band, a receiver and sensors to record the lap time. It is now all integrated into the
-
Selection of content in itunes problem
I could not solve the problem in the itunes store. When I click on a film image or music album on the itunes store, it evokes the bad movie or album. I have to move my mouse somewhere on the previous film or the image of the album so that I can cho
-
"Update security settings" mail exchange
I looked and I do not think that someone posted a fix or a solution to the problem. On each droid initialize. The error message "Update security settings" appears in bar. I click on the message and nothing happens. It took me before on my corporate e
-
I'm trying to uninstall lightscribe that came pre-installed on my computer and I continue to be asked to log in as an administrator and I don't know where or how to do it.
-
Error message when you try to connect to the remote desktop
I got a set up for a while - Remote Desktop connection, but yesterday, my power is out, turn off my computer while I was on it. Now, whenever I try to connect to my remote desktop I get the following error Message: "unable to load the ActiveX contro