From ebb5e47760cc156fba6d6a93ad0dfaeb562f4771 Mon Sep 17 00:00:00 2001 From: Steve Kondik Date: Sat, 13 Nov 2010 03:58:40 -0500 Subject: input: Fix keymapping and handle www/com key. The keymappings derived when setting up for Espresso were incorrect and causing problems on other keyboards like Vision. Corrected this, and also added handling for the www/com key on Vision. Change-Id: I4303c60498469a24f5ce2b4397b6cf822ac81f67 --- core/java/android/text/method/QwertyKeyListener.java | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'core/java/android/text') diff --git a/core/java/android/text/method/QwertyKeyListener.java b/core/java/android/text/method/QwertyKeyListener.java index b3926f2..7a1b6aa 100644 --- a/core/java/android/text/method/QwertyKeyListener.java +++ b/core/java/android/text/method/QwertyKeyListener.java @@ -106,6 +106,12 @@ public class QwertyKeyListener extends BaseKeyListener { return true; } + if (i == KeyCharacterMap.DOT_WWW_INPUT || i == KeyCharacterMap.DOT_COM_INPUT) { + content.replace(selStart, selEnd, selStart == 0 ? "www." : ".com"); + adjustMetaAfterKeypress(content); + return true; + } + if (i == KeyCharacterMap.HEX_INPUT) { int start; -- cgit v1.1