> For the complete documentation index, see [llms.txt](https://docs.oscwii.org/wii-shop-channel/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.oscwii.org/wii-shop-channel/js/keyboard.md).

# 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="/files/jyGuaakDJusMwqYvIS1u" 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="/files/NU1D6KkkvXw1sg5tHlh3" 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="/files/1FtYCtlti0nkzc0SYzfI" 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="/files/JpAT65SYBgnRSRjJGcEj" 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.

![](/files/TN3pIzjricUHZJiOfj9F)

### Default (?)

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

![](/files/5QW0I5Ey8JkHkffJXWuk)

### Number Pad

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

![](/files/qdvpdUieHhWfVw1rPvXg)

### Default without Completion, Return Key

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

![](/files/xOKly6eKDCiZ9DpriZa4)

### Large Font

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

![](/files/YaCxZQjSmbxMoprrapYy)

### Default without Return, Completion, Number Pad

Type `5`. Lacks word completion/suggestion, and the switcher UI between QWERTY and a number pad: <img src="/files/pB3kq6Z8DFzaf9DiTKvA" alt="" data-size="line">

![](/files/tvwEPxemmagg2H3YUGcQ)

### Large Font without Return and Number Pad

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

![](/files/gloQJ7P3V4jSW16bz3uY)

### Large Number with Decimal

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

![](/files/TsYLfPvkpeW9GeHr4Sdc)

### 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?

![](/files/02Zt8Egmb5eNI94dsSXu)

### Friend Code Entry

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

<div align="center"><img src="/files/c67qJVgQ1HScBI6x7SYw" 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.

![](/files/3G4W9wPYDMWpaBnUEk5v)
