- Home /
Question by
robert_mathew · Sep 21, 2013 at 03:11 AM ·
spaceblockback
block Backspace key
is there any way to block Backspace key in text field.Player should not be able to use back space key inside the text field is there way to block it.
Comment
Best Answer
Answer by erdavis · Sep 21, 2013 at 07:08 AM
You can try this code-
void OnGUI()
{
if( Event.current.keyCode == KeyCode.Backspace && ( Event.current.type == EventType.KeyUp || Event.current.type == EventType.KeyDown ) )
{
Event.current.Use();
}
------ your code --------
}
Your answer
Follow this Question
Related Questions
Making a block move when its clicked 1 Answer
Terrain Modification Script index out of range? 1 Answer
Trying to remove blocks with no neighbors in cave generation code, so there are no floating blocks. 2 Answers
How to make a Homeworld Style Camera. 3 Answers
iPhone Real World Touch Detection. 1 Answer