[Development] InputMethondHints for Enter key types

Byunggul Koh byunggul.koh at lge.com
Mon Jul 6 11:15:41 CEST 2015


Hello QT developers,

Enter-key has various semantics on Input-method depending on the situation, e.g. “Enter for Search, Go, Next and so on. So I need a way to inform VKB of a type of enter to display a string instead of “Enter”.

For this purpose I’m considering to add more enums on InputMethodHint as followings.

diff --git a/src/corelib/global/qnamespace.h b/src/corelib/global/qnamespace.h
index 82b383e..d4daf86 100644
--- a/src/corelib/global/qnamespace.h
+++ b/src/corelib/global/qnamespace.h
@@ -1362,6 +1362,15 @@ public:
         ImhLatinOnly = 0x800000,

         ImhExclusiveInputMask = 0xffff0000
+
+        ImEnterKeyDefault = 0x100000000,
+        ImEnterKeyDone = 0x200000000,
+        ImEnterKeyGo = 0x400000000,
+        ImEnterKeyNext = 0x800000000,
+        ImEnterKeySearch = 0x1000000000,
+        ImEnterKeySend = 0x2000000000,
+
+        ImEnterKeyTypeMask = 0xffff00000000
     };
     Q_DECLARE_FLAGS(InputMethodHints, InputMethodHint)


Before making a patch I want to hear your opinions about 
  - whether this is a appropriate place,
  - naming of enums or more usage other than these,
  - etc…


Best regards
Byunggul.


------
Byunggul Koh (고병걸)

Software Engineer <at> LG Electronics Inc.

CTO Division / SW Platform Lab. 
Yang-jae dong 221, Seoul, Korea.


More information about the Development mailing list