You can simplify this code:

var keyboard = Keyboards[name] || Keyboards[keyboardAlias[name]];