# Keyboard

When you want to accept content from the user, you instantiate and interact with `wiiKeyboard`. Utilizing its method, you can specify layouts and options for input that best fit your content.

```javascript
var keyboard = new wiiKeyboard();
```

Note that `wiiKeyboard` will only function on pages loading over HTTPS. You will need to modify the Wii Shop Channel to load your content. Opera (and IOS via EC) only has SSLv3/TLS 1.0 available, so additional modifications to various trust levels may be necessary.

## Members

Unlike other objects, `wiiKeyboard` only exposes one member. Its usefulness is instead via its parameters variants.

| Member Name                                       | Discussion                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| ------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `keyboard.call(type)`                             | <p>Invokes a keyboard of the specified <a href="#keyboard-types">type</a>.</p><p></p><p><em>An example of</em> <code>keyboard.call(1)</code><em>.</em></p><p><img src="https://568241064-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MbN-IqagpwSDYwN1Dj2%2Fuploads%2FlXfHAPWVdk8wCsXk7Pou%2FScreen%20Shot%202021-12-04%20at%2018.10.21.png?alt=media&#x26;token=fc82d618-046a-4023-a8b8-5aa84c3b8ab0" alt=""></p>                                                                                                                                                                                                                                               |
| `keyboard.call(type, rowLimit)`                   | <p>Invokes a keyboard of <a href="#keyboard-types">type</a> with a limit of the amount of rows available for typing.</p><p></p><p><em>An example of a row limit when invoked as</em> <code>keyboard.call(1, 1)</code><em>. As the text (highlighted red to designate the error) exceeds the first row, it is deleted upon entry.</em></p><p><img src="https://568241064-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MbN-IqagpwSDYwN1Dj2%2Fuploads%2FewaP9pWXh70m6jy4EvdQ%2Fimage.png?alt=media&#x26;token=63381d6b-7692-4e5a-8374-188e61072132" alt=""></p>                                                                                                     |
| `keyboard.call(type, rowLimit, isPassword)`       | <p>Instantiates a keyboard of <a href="#keyboard-types">type</a> with <code>rowLimit</code> and whether the entered text <code>isPassword</code>. If true, entered text becomes asterisks after entry or space bar, as pictured beneath.</p><p></p><p><em>An example of</em> <code>keyboard.call(1, 3, true)</code><em>. Note that "text", highlighted red, has not yet converted to asterisks.</em></p><p><img src="https://568241064-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MbN-IqagpwSDYwN1Dj2%2Fuploads%2FIY1NByRmrHsplW10JVuL%2FScreen%20Shot%202021-12-04%20at%2018.05.39.png?alt=media&#x26;token=173cbaff-de75-470e-af0c-611bf5c2e50f" alt=""></p> |
| `keyboard.call(type, rowLimit, isPassword, hint)` | <p>Instantiates a keyboard of type with <code>rowLimit</code>, whether the entered text <code>isPassword</code>, and a background text of <code>hint</code>.</p><p></p><p><em>An example of</em> <code>keyboard.call(1, 3, false, 'Text Hint')</code>.</p><p><img src="https://568241064-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MbN-IqagpwSDYwN1Dj2%2Fuploads%2FdxkUWklDa0A2aIuEdxSP%2FScreen%20Shot%202021-12-04%20at%2018.09.35.png?alt=media&#x26;token=1b086cad-5b3b-4239-9302-cfb4c1aded47" alt=""></p>                                                                                                                                               |

## Keyboard Types

There are 11 variants of keyboards available. For all examples, the used code to invoke was similar to the following:

```html
<textarea rows="5" style="width: 100%" onmousedown="keyboard.call(1);"></textarea>
```

The 11 variants are as follows:

* [Default](#default)
* [Default (2)](#default-1)
* [Number Pad](#number-pad)
* [Default without Return, Completion, Number Pad](#default-without-return-completion-number-pad)
* [Large Font](#large-font)
* [Default without Return](#default-without-return)
* [Large Font without Return and Number Pad](#large-font-without-return-and-number-pad)
* [Large Number with Decimal](#large-number-with-decimal)
* [Large Number with Decimal (2)](#large-number-with-decimal-1)
* [Friend Code Entry](#friend-code-entry)
* [Default without Return](#default-without-return)

### Default

Type `0`, or defaulted to if any value above 13 is specified. A generic keyboard.

![](https://568241064-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MbN-IqagpwSDYwN1Dj2%2Fuploads%2F02ssFIqAwl8orgHypmIu%2Fimage.png?alt=media\&token=da116f33-e6f8-4c24-84ad-05432523157c)

### Default (?)

Type `1`. Appears to behave similarly to [Default](#default) on all regions.

![](https://568241064-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MbN-IqagpwSDYwN1Dj2%2Fuploads%2FpcCKLg8d6TgdmXwSTAgg%2Fimage.png?alt=media\&token=c0dbfb0f-2d98-4e3d-9c6b-01133f733ba3)

### Number Pad

Type `2`. Provides a generic number pad, useful for things such as friend code entry.

![](https://568241064-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MbN-IqagpwSDYwN1Dj2%2Fuploads%2FU8WaYVur8Ptm0ca2QOpO%2Fimage.png?alt=media\&token=45a2907b-3229-4844-90b8-23e7904a7b80)

### Default without Completion, Return Key

Type `3`. The same as [Default](#default), but lacking a return key and word completion/suggestion.

![](https://568241064-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MbN-IqagpwSDYwN1Dj2%2Fuploads%2FJg6HLugitlfFF2DOsZZG%2Fimage.png?alt=media\&token=5dd02b2b-8fc2-46c1-a74d-89ec50b3a16c)

### Large Font

Type `4`. Entered text cannot exceed the text field's length.

![](https://568241064-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MbN-IqagpwSDYwN1Dj2%2Fuploads%2FHgEKYCUed32WI7T4o3oJ%2Fimage.png?alt=media\&token=b9902873-252d-4f1a-adcf-db8a12380126)

### Default without Return, Completion, Number Pad

Type `5`. Lacks word completion/suggestion, and the switcher UI between QWERTY and a number pad: <img src="https://568241064-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MbN-IqagpwSDYwN1Dj2%2Fuploads%2FSmI9WuD131zOxkwnPI4R%2FScreen%20Shot%202021-12-04%20at%2018.35.16.png?alt=media&#x26;token=c7fdbd80-e77e-49b1-bef8-7d8e8cc076c1" alt="" data-size="line">

![](https://568241064-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MbN-IqagpwSDYwN1Dj2%2Fuploads%2FFR86FJOmJAdJjVVmjaXj%2Fimage.png?alt=media\&token=a52feecc-5c39-4041-b39d-6b92b7de7fdf)

### Large Font without Return and Number Pad

Type `6`. Lacks word completion/suggestion, and the switcher UI between QWERTY and a number pad.

![](https://568241064-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MbN-IqagpwSDYwN1Dj2%2Fuploads%2Fw9tETuwYEGwkgIbHASVQ%2Fimage.png?alt=media\&token=2736daaa-68cc-41a2-b201-a42565901530)

### Large Number with Decimal

Type `7`. Provides a decimal point alongside numeric entry.

![](https://568241064-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MbN-IqagpwSDYwN1Dj2%2Fuploads%2FSZF8uE9Ox2WnqQkVx9GE%2FScreen%20Shot%202021-12-04%20at%2018.37.59.png?alt=media\&token=050175f2-6f11-466f-abfa-5362c7fbca4e)

### Large Number with Decimal(?)

Type `8`. Appears to operate similarly to [Large Number with Decimal](#large-number-with-decimal) - TODO: Does this function differently in other regions?

![](https://568241064-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MbN-IqagpwSDYwN1Dj2%2Fuploads%2FjWHCTahk0moeve2J51dg%2FScreen%20Shot%202021-12-04%20at%2018.38.08.png?alt=media\&token=c0ddd49d-9289-4615-9057-3b5a8a661935)

### Friend Code Entry

Type `9`. Provides a usable Friend Code entry pad.

<div align="center"><img src="https://568241064-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MbN-IqagpwSDYwN1Dj2%2Fuploads%2FhE6bQBgSmKN0vjSCTMo8%2FScreen%20Shot%202021-12-04%20at%2018.38.22.png?alt=media&#x26;token=fcb3eadf-c963-4ec7-b5b7-a2122cb0134c" alt=""></div>

### Default without Return

Type `10`. Unlike [Default without Completion, Return](#default-without-return-key), this type does have completion. It lacks a return key.

![](https://568241064-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MbN-IqagpwSDYwN1Dj2%2Fuploads%2FaBdqgz7mxxwSdYgczsHd%2FScreen%20Shot%202021-12-04%20at%2018.38.41.png?alt=media\&token=cacd0339-71e3-437a-9280-b2f585f79e58)
