My macbook behaves as if the shift and alt keys are constantly pressed causing permanent special characters. Any ideas how I can stop this happening?

Any help would be hugely appreciated, thanks

But with my function the program doesn't know if the pressed key is printable or if it's shift, ctrl
or something like thatProbably the easiest way is to check and see if e.getKeyChar() < a space character or if e.getKeyCode() >= 127. You can use e.getModifiers() to get the modifier, etc... -- take a look at the documentation for java.awt.event.KeyEvent class.
V.V.

Similar Messages

Maybe you are looking for