Seth Carnegie
Seth Carnegie

Reputation: 75150

Entering foreign characters in a text box

In Windows 7, you can configure keyboards so that you can type in different languages. To switch "virtual" keyboards, you have to click the little icon in the task bar and select the language in which you want to type.

I have two text boxes on a page, one is for typing English letters and the other is for typing Korean Hangul and Hanja. I would like users to be able to click into one, type English, and click in the other and type Korean without having to switch keyboards in the task bar (or optimally without even having alternate keyboards set up). The user will be switching languages often, so it will be highly inconvenient to have to switch manually every time.

Is there a way to specify for a certain textbox that you want the keyboard for that textbox to be a specific one?

Upvotes: 2

Views: 1567

Answers (1)

Paweł Dyda
Paweł Dyda

Reputation: 18662

In theory there is a CSS property called ime-mode which should let you control the behavior of input tags:

<input id="english" style="ime-mode: disabled">
<input id="korean" style="ime-mode: active">

The problem is, browser support is very limited (at least that is what MDN says) and it might not just work for certain web browser/Operating System combinations (i.e. won't run on Linux).

Upvotes: 1

Related Questions