Converts literal to numerical joystick hat names and vice versa.
converted = cock.convertJoystickHat ( input, forceliteral )
number input
boolean forceliteral
string converted
Function will make no change if it was supplied with literal input and forced to output literal value. Same for numerical values.
Unlike cock.convertDevice, this function aims specifically at joystick hats. It converts hat name to hat number rather than device number. E.g. "joystick hat 3" converted to "3" and vice versa, and not to "8" as with convertDevice function.