It looks like you forgot the KeyBinding
Try this:
public static KeyBinding Switch = new KeyBinding("Switch", 19);
public void keyboardEvent(KeyBinding keybinding)
{
if(keybinding == Switch)
{
//Do stuff here
}
public void load()
{
ModLoader.registerKey(this, Switch, false);
ModLoader.addLocalization("Switch", "Switch");
ModLoader.setInGameHook(this, true, true);
}