public class TextFieldInputMappingAdv extends TextFieldInputMapping {
@Override
public NiftyInputEvent convert(KeyboardInputEvent inputEvent) {
NiftyInputEvent evt = super.convert(inputEvent);
if(evt != null)
return evt;
if(!inputEvent.isKeyDown() || inputEvent.getKey() == KeyboardInputEvent.KEY_LCONTROL || inputEvent.getKey() == KeyboardInputEvent.KEY_RCONTROL)
return null;
evt = NiftyInputEvent.Character;
evt.setCharacter('?');
if(inputEvent.isControlDown() && inputEvent.getKey() == KeyboardInputEvent.KEY_Q)
evt.setCharacter('@');
else if(inputEvent.isControlDown() && inputEvent.getKey() == KeyboardInputEvent.KEY_2)
evt.setCharacter('�');
else if(inputEvent.isControlDown() && inputEvent.getKey() == KeyboardInputEvent.KEY_3)
evt.setCharacter('�');
else if(inputEvent.isControlDown() && inputEvent.getKey() == KeyboardInputEvent.KEY_7)
evt.setCharacter('{');
else if(inputEvent.isControlDown() && inputEvent.getKey() == KeyboardInputEvent.KEY_8)
evt.setCharacter('[');
else if(inputEvent.isControlDown() && inputEvent.getKey() == KeyboardInputEvent.KEY_9)
evt.setCharacter(']');
else if(inputEvent.isControlDown() && inputEvent.getKey() == KeyboardInputEvent.KEY_0)
evt.setCharacter('}');
else if(inputEvent.isControlDown() && inputEvent.getCharacter() == '�')
evt.setCharacter('\\');
else if(inputEvent.isControlDown() && inputEvent.getKey() == KeyboardInputEvent.KEY_EQUALS)
evt.setCharacter('~');
// else if(inputEvent.isControlDown() && inputEvent.getCharacter() == '+')
// evt.setCharacter('~');
else if(inputEvent.isControlDown() && inputEvent.getKey() == KeyboardInputEvent.KEY_M)
evt.setCharacter('�');
else if(inputEvent.isControlDown() && inputEvent.getCharacter() == '<')
evt.setCharacter('|');
else
return null;
return evt;
}