implement KeyConverter.getKeyCode