hi guys
is there a shortcut (algorithm) to restrict a certain key events
ex: assuming that e is a KeyEvent object
if (e.getKeyCode() == KeyEvent.VK_ENTER ||
e.getKeyCode() == KeyEvent.VK_SPACE ||
e.getKeyCode() == KeyEvent.VK_BACKSPACE ) {
// do something
}
or in a pseudocode style
1) if keycode is not equal to space bar or enter or shift or tab f2 or f3
3) if keycode is ONLY equal to Space bar and enter and shift and tab
2) if keycode is ONLY equal to alphabet
i can make a huge if statement to accomplish what i need. (though im not yet trying it but it will eat all my spaces on my code.
is there atleast a short way to do what i want to do in here?
thanks