KeyUp(Event e, int key) not responding
For some reason the key events, such as "keyUp(Event e, int key)", will only fire after I have first clicked in the applet's window. Any clues as to why this might be happening? I though maybe it was a focus issue, so I tried using "requestFocus()" in my applet initialization, but that didn't work either. Any help is greatly appreciated.
HERE's the source:
import java.awt.*;
import java.awt.event.*;
import java.applet.Applet;
public class OLGame extends Applet implements ActionListener, KeyListener
Image image;
Graphics offscreen;
public void init()
setBackground(Color.black);
image = createImage(600,500);
offscreen = image.getGraphics();
setSize(600,500);
this.addKeyListener(this);
this.requestFocus();
public void update(Graphics g)
paint(g);
public void paint(Graphics g)
g.drawImage(image,0,0,this);
public void actionPerformed(ActionEvent evt)
// add action events here
public void keyPressed(KeyEvent e)
offscreen.fillRect(0,0,600,500);
offscreen.setColor(Color.red);
offscreen.drawString(""+e.getKeyCode(), 25,25);
offscreen.setColor(Color.black);
repaint();
public void keyReleased(KeyEvent e)
//empty, but needed for implementing KeyListener
public void keyTyped(KeyEvent e)
//empty, but needed for implementing KeyListener
Similar Messages
-
10.4.11 Policy Key Not Responding
I opened my activity monitor to check on a current process then noticed in red, Policy Key Not Responding. It had 4 hangs as well. I have repaired disk permissions and that is about it. My question is, is there a security problem of some sort when my Policy Key is not responding and secondly how can i fix this. Thanks for the help.
Here is what is listed when I check the info from the process. Its parent process is called Window Server 64. Not sure what any of the below means.
/Applications/PolicyKey.app/Contents/MacOS
/Applications/PolicyKey.app/Contents/MacOS/PolicyKey
/System/Library/CoreServices/CharacterSets/CFUnicodeData-B.mapping
/System/Library/CoreServices/CharacterSets/CFCharacterSetBitmaps.bitmap
/Library/Caches/com.apple.IntlDataCache.sbdl.501
/usr/lib/libxml2.2.dylib
/System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.fram ework/Versions/A/Resources/Extras.rsrc
/usr/lib/dyld
/usr/lib/libSystem.B.dylib
/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CarbonCo re.framework/Versions/A/CarbonCore
/usr/lib/libobjc.A.dylib
/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/OSServic es.framework/Versions/A/OSServices
/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Metadata .framework/Versions/A/Metadata
/System/Library/Frameworks/Security.framework/Versions/A/Security
/System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/OpenScripting. framework/Versions/A/OpenScripting
/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/P rintCore.framework/Versions/A/PrintCore
/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/L aunchServices.framework/Versions/A/LaunchServices
/System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HTMLRendering. framework/Versions/A/HTMLRendering
/System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/NavigationServ ices.framework/Versions/A/NavigationServices
/System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.fram ework/Versions/A/HIToolbox
/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/SearchKi t.framework/Versions/A/SearchKit
/usr/lib/libstdc++.6.0.4.dylib
/usr/lib/libicucore.A.dylib
/usr/lib/libcrypto.0.9.7.dylib
/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/C olorSync.framework/Versions/A/ColorSync
/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CFNetwor k.framework/Versions/A/CFNetwork
/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/A TS.framework/Versions/A/ATS
/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/I mageIO.framework/Versions/A/ImageIO
/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/I mageIO.framework/Versions/A/Resources/libJP2.dylib
/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/I mageIO.framework/Versions/A/Resources/libTIFF.dylib
/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/C oreText.framework/Versions/A/CoreText
/System/Library/Frameworks/CoreAudio.framework/Versions/A/CoreAudio
/System/Library/PrivateFrameworks/DesktopServicesPriv.framework/Versions/A/Deskt opServicesPriv
/System/Library/Frameworks/Foundation.framework/Versions/C/Foundation
/dev/null
/dev/console
/dev/console
obj=0x0243aea0
obj=0x02503ee0
obj=0x0243aea0 -
RemoteApp receives multiple KeyUp events without any keys being pressed
Hi All,
I have a very simple winforms app that I am using to try and track down what is happening with keyboard events when using RemoteApp.
Basically I have a form and a textbox that track the KeyDown, KeyPress and KeyUp events.
As soon as I start my app via RemoteApp I receive multiple KeyUp events without even pressing a key.
Does anyone know why RemoteApp would be sending these random KeyUp events.
The code of my simple test app is as follows:
Public Class Form1
Dim lst As New List(Of String)
Private Sub AddtoList(str As String)
lst.Add(str)
End Sub
Private Sub TextBox1_KeyDown(sender As Object, e As System.Windows.Forms.KeyEventArgs) Handles TextBox1.KeyDown
AddtoList("txt KeyDown" & vbTab & "KeyCode is " & e.KeyCode)
End Sub
Private Sub TextBox1_KeyPress(sender As Object, e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox1.KeyPress
AddtoList("txt KeyPress" & vbTab & "KeyChar is " & e.KeyChar)
End Sub
Private Sub TextBox1_KeyUp(sender As Object, e As System.Windows.Forms.KeyEventArgs) Handles TextBox1.KeyUp
AddtoList("txt KeyUp" & vbTab & "KeyCode is " & e.KeyCode)
End Sub
Private Sub Form1_FormClosing(sender As Object, e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing
AddtoList("Form Closing")
IO.File.AppendAllLines(Application.StartupPath & "\SimpleKeyUp_v2.txt", lst)
End Sub
Private Sub Form1_KeyDown(sender As Object, e As System.Windows.Forms.KeyEventArgs) Handles Me.KeyDown
AddtoList("Form KeyDown" & vbTab & "KeyCode is " & e.KeyCode)
End Sub
Private Sub Form1_KeyPress(sender As Object, e As System.Windows.Forms.KeyPressEventArgs) Handles Me.KeyPress
AddtoList("Form KeyPress" & vbTab & "KeyChar is " & e.KeyChar)
End Sub
Private Sub Form1_KeyUp(sender As Object, e As System.Windows.Forms.KeyEventArgs) Handles Me.KeyUp
AddtoList("Form KeyUp" & vbTab & "KeyCode is " & e.KeyCode)
End Sub
Private Sub Form1_Load(sender As Object, e As System.EventArgs) Handles Me.Load
AddtoList("Form Load")
End Sub
End Class
Simply opening and closing the app via RemoteApp gives the following results:
Form Load
Form KeyUp KeyCode is 9
txt KeyUp KeyCode is 9
Form KeyUp KeyCode is 16
txt KeyUp KeyCode is 16
Form KeyUp KeyCode is 16
txt KeyUp KeyCode is 16
Form KeyUp KeyCode is 17
txt KeyUp KeyCode is 17
Form KeyUp KeyCode is 17
txt KeyUp KeyCode is 17
Form KeyUp KeyCode is 9
txt KeyUp KeyCode is 9
Form KeyUp KeyCode is 18
txt KeyUp KeyCode is 18
Form KeyUp KeyCode is 9
txt KeyUp KeyCode is 9
Form KeyUp KeyCode is 18
txt KeyUp KeyCode is 18
Form KeyUp KeyCode is 9
txt KeyUp KeyCode is 9
Form Closing
Cheers and Thanks in Advance!
DwayneHi,
It seems that your issue has been out of the scope of this forum.For coding issue,I suggest you ask in the
MSDN forum to see whether anyone can help you out.
Regards,
Clarence
TechNet Subscriber Support
If you are
TechNet Subscription user and have any feedback on our support quality, please send your feedback
here.
Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. -
My iPod touch 4 home key not responding half of the time
My iPod touch 4 home key is not responding half of the time when closeing apps and when iPod is asleep
You can try the standard fixes:
- Reset. Nothing will be lost.
Reset iPod touch: Hold down the On/Off button and the Home button at the same time for at
least ten seconds, until the Apple logo appears.
- Restoring from backup
- Restoring to factory defaults/new iPod.
- If under waranty, try to get it fixed/replace under the warranty.
- FIX for iPod Touch Home Button: Apple Support Communities -
Apple Bluetooth Keyboard : ESC Key not responding
I'm using an Apple Bluetooth Keyboard with many Apple products (MBA, MBP, iPad) and i have a big problem : The ESC key is not responding. Everything else is working on my keyboard except the ESC Key. Do you know how to fix it ?
Hello:
It is, of course, possible that the KB has failed....
Try resetting the PRAM. If that does not help, I think it is time for a new one.
Barry -
I purchased a new wireless keyboard just recently. I have attempted to increase/decrease volume with the function keys at the very top of the keyboard. They have not responded. After thoroughly searching the communities and repeating steps others have followed, I am still not able to use the volume keys. I need help.
you need to reset your SMC... heres the link
http://support.apple.com/kb/HT3964 -
Open Firmware startup keys not responding
Hi there,
My Command-Option-O-F combination at powerup is not responding to get me into the Open Firmware.
Any thoughts?
Cheers,
AaronIntel Macs do not support Open Firmware rather they use the EFI - extended firmware interface. You can start up in safe mode, single-user mode, or verbose mode. See the following:
Startup key combinations for Intel-based Macs. -
Portege M400 Fn Keys not responding
My function keys on my laptop are suddenly not responding.
I've never had a problem with them prior to this, but I'm not sure how to fix them at this point.
When I hit the function key by itself, the green light beneath F11 still responds, but that's really the extent of the activity.
I've had the laptop for almost a year, and I'm running an XP OS.
Any comments or suggestions are much appreciated.
Thank you!Hi again ;)
I mean the Common Modules is a Toshiba driver which is necessary and important for the FN button usage.
You can find it on the Toshiba driver page:
http://eu.computers.toshiba-europe.com -> Support & Download -> Download Drivers
There you have to choose your notebook series, OS and then you could download it.
Then unzip the package and reinstall it on your notebook.
Hope this helps -
hi
i followed the steps in the tutorial http://www.thetechlabs.com/tutorials/flash/creating-a-flash-lite-application-with-flash-cs 4-and-actionscript-20/ but when i run the application in the device central emulator, the soft keys do not respond. i even edited the action script code to change the text in the textboxes when the soft key is pressed but there is still no response.
ThanxHi dahaka2010,
Has your problem been solved?
On what profile/s and what content type/s were you trying it out? Wallpaper, Screensaver and Embedded in HTML for example do not have soft key functionality. Some profiles also might not support soft keys altogether.
Thanks,
Nandi -
I'm running tiger still but my F1 thru F11 keys do not respond does anyone have a idea how to fix this?
Do they work if you hold fn and hit them ?
If so open System Preferences/Keyboard & Mouse, click the Keyboard Tab and uncheck "Use all F1, F2 etc, keys as standard function keys" -
Thinkpad S440 Keys not responding
Hello Community!
I have a Thinkpad S440 from 09/13 and in the last few weeks the p-key as well as the o, the 0 and sometimes ü,ö,ä (German keyboard) are not responding.
They don't react to keypresses, however, after pressing them a few times they become responsive and do so every press of the key, unless I leave them alone for a while, then they become unresponsive again.
It's not dust or dirt, I've been using pressured air to clean it it changed nothing.
Now I've been told that this might be a problem with the fixation of the keyboard, the way it stops and starts certainly points to this.
Now, do I have to send it in?
I know how to open the thing and I have professionals around who might do it but I'm afraid of voiding the warranty.
What shall I do?
Thanks for reading!I opened the backcover and had a look.
However to look at the keyboard you'd have to remove basically every component of the interior and neither me nor anyone I know dares to do that.
I tightened every lose screw I could find, one screw at the battery showed clear signs of unprofessional usage too.
This seems to have made the problem A BIT better, the keys work more often but not well at all so it's definitely a problem with a connector.
I think I can't but use the warranty.
I don't feel too well with sending my laptop with a lot of sensitive data but I think I'll have to. -
Escape key not responding, along with FN keys -Sattelite L300
ok so this has been occuring for a little while, not sure since when, but very recently
basicly, the escape key wont respond to programs, and neither will most of the FN keys, FN F10+F11 work, the LED's light up, but the rest of the FN's do nothing
the escape key responded to a keyboard testing program, it came back as responsive and working, but in programs such as a 3D engine and MSN Messenger, escape refuses to respond and work as it should
it hasnt always been like this, theyve worked before, ive had the laptop since christmas, had to take it back because the wireless card brokeGo to:
http://eu.computers.toshiba-europe.com/innovation/download_drivers_bios.jsp
and download the TVAP package for Vista (32bit I assume).
Uninstall the current TVAP in Control Panel -> Programs and Features
Reboot and install the new TVAP
ps. You need to burn the Recovery Discs yourself, ensure you use good quality media to avoid problems. -
I don't know for what reason my MBP's F12 key is not responding, making it impossible to show the dashboard just by pressing F12. Well, to be precise, there is indeed a little response: there is a dull sound signifying you just did something wrong when I pressed F12. Anybody got a clue?
mbp233 wrote:
No, it's not assigned to anything else.
I'm guessing you've done this already, but just to make sure, open Sys Prefs, Keyboard, and check the box for "Use all F1, F2, etc. keys as standard function keys."
Then go to Keyboard Shortcuts, Dashboard&Dock, and check the box for "Dashboard . . . F12."
Close Sys Prefs and see if it works.
If that doesn't work, log in to another account and see if it works the way you want it to in that account. If so, it's a software issue, probably a corrupt preference file in your main account. If not, it may be a hardware issue. -
Osx 10.5.8 keys not responding
My keyboard on my Mac Book has keys which are not responding and some which have different characters when pressed.
My first thought is that my kids have changed stiings while using it, but I cannot find how to change settings back.
Does anyone know how I can fix this problem as I can't use laptop to log in to my account and I am using a standard usb keyboard.mobyzone133,
what are you trying to do in the Finder for which you’re receiving no response? -
Keys not responding on wireless keyboard
When I turn my computer on, my keyboard does not respond. I have to re-start the system in order to get it to respond (every time). I have changed the batteries, for the mouse and keyboard. I have moved the keyboard closer to the system, and that has done nothing. Any suggestions?
@Chanda123 ,
Hello and thank you for posting on the HP support forum. First thing I would need to know is how does the wireless mouse and keyboard connect to the notebook.
Does it have a USB stick to make the connection?
If it does is there any other issues with the USB port you are using?
If you plug a regular mouse into the same port will it respond?
Please post back with as much information you can and include what kind of wireless mouse and keyboard you are using.
Thank you again and have a great day.
Please click the "Thumbs Up" on the bottom right of this post to say thank you if you appreciate the support I provide!
Also be sure to mark my post as “Accept as Solution" if you feel my post solved your issue, it will help others who face the same challenge find the same solution.
D5GR
I work on behalf of HP
Maybe you are looking for
-
How do I get the bookmarks on the dropdown in addition to the menu items?
I used to be able to click on the bookmark icon and have my bookmarks appear on the dropdown along with the menu choices. Now, all I get is the menu choices and I have to click Bookmark Toolbar and then Bookmarks to see the bookmarks. How do I get th
-
SQLLDR: Is it possible to import CSV using column defined in CVS?
Hello, We are in 11gR1 ...and I have just practiced easy SQLLDR import ... So I feel quite new in the domain. We receive CSV files with, at their first line, the column titles, ... These CSV have their columns never at the same place ... and we exper
-
Error in L_TO_CREATE_MULTIPLE
Hi Experts, I'm using FM-- L_TO_CREATE_MULTIPLE to create the Transfer order for multiple items, i need to pass I_BETYP and I_BENUM values while creating transfer order. What values we need to pass in these parameters and from where we get these valu
-
Well, the title just about tells it all! It can find the network connection, it just won't choose it automatically as it did under Snow Leopard. Any suggestions? Cheers
-
Nodejs module client call for replaceDocument() not working
I copied the sample todo application from here - https://github.com/Azure/azure-documentdb-node/tree/master/tutorial/todo Then I created my own documentDB collection and can successfully query it from my code. The call to self.client.queryDocuments(s