Some keycodes are working in a script I have and some are not. For example:
else if (Input.GetKeyDown(KeyCode.Return)){
works
but
else if (Input.GetKeyDown(KeyCode.Delete)){
does not.
Any ideas why?
Some keycodes are working in a script I have and some are not. For example:
else if (Input.GetKeyDown(KeyCode.Return)){
works
but
else if (Input.GetKeyDown(KeyCode.Delete)){
does not.
Any ideas why?
Can you post the script in its entirety? (Or at least the function from which the above excerpts were taken?)
Sure.
else if (Input.GetKeyDown(KeyCode.LeftShift) || Input.GetKeyDown(KeyCode.RightShift)){
shiftOn = 1;
highlight.transform.localPosition.x = .04;
}
else if (Input.GetKeyDown(KeyCode.CapsLock)){
print ("CapsLock");
if (shiftOn < 2){
shiftOn = 2;
highlight.transform.localPosition.x = 0.935;
}
else {
shiftOn = 0;
highlight.transform.localPosition.x = 2;
}
}
else if (Input.GetKeyDown(KeyCode.Delete)){
DeleteLetter();
}
else if (Input.GetKeyDown(KeyCode.Return)){
WriteBookInfo();
inputLineText.transform.position.y = 10;
inputTextBG.transform.position.y = 10;
}
else if (Input.GetKeyDown(KeyCode.RightArrow)){
EditRight();
}
else if (Input.GetKeyDown(KeyCode.LeftArrow)){
EditLeft();
}
Delete and Caps lock don’t work. The others do.
It doesn’t look like you got the whole function in there. (It would be useful to see the function in its entirety.)