A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://webplatform.github.io/docs/dom/TextEvent/inputMethod below:

inputMethod ยท WebPlatform Docs

inputMethod Summary

Gets a value that describes how text is entered.

Property of dom/TextEventdom/TextEvent

Syntax

Note: This property is read-only.

var inputMethod = event.inputMethod;
Return Value

Returns an object of type NumberNumber

The input method used to generate the event. One of the following values -

Examples

Display a user friendly value of the inputMethod property of an event.

var description=(event.inputMethod)?getDOMInputMethod(event.inputMethod):'not supported';

    function getDOMInputMethod(iInputMethod){
        switch (iInputMethod){
            case TextEvent.DOM_INPUT_METHOD_UNKNOWN:
                return 'Unknown';
            case TextEvent.DOM_INPUT_METHOD_KEYBOARD:
                return 'Keyboard';
            case TextEvent.DOM_INPUT_METHOD_PASTE:
                return 'Paste';
            case TextEvent.DOM_INPUT_METHOD_DROP:
                return 'Drop';
            case TextEvent.DOM_INPUT_METHOD_IME:
                return 'IME';
            case TextEvent.DOM_INPUT_METHOD_OPTION:
                return 'Option';
            case TextEvent.DOM_INPUT_METHOD_HANDWRITING:
                return 'Handwriting';
            case TextEvent.DOM_INPUT_METHOD_VOICE:
                return 'Voice';
            case TextEvent.DOM_INPUT_METHOD_MULTIMODAL: 
                return 'MultiModal';
            case TextEvent.DOM_INPUT_METHOD_SCRIPT:
                return 'Script';
            default:
                return 'Unknown';
        }
    }
Usage
 Use to determine if the device that initiated the textinput event is to be 'trusted'.
Notes

Not implemented in Safari or Chromium.

Related specifications
DOM Level 3 Events (20110531)
Outdated Working Draft
Attributions

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4