diff --git a/demos/assets.c b/demos/assets.c
index d1b6c357f..92a12beda 100644
--- a/demos/assets.c
+++ b/demos/assets.c
@@ -41,6 +41,7 @@
#include "assets/inc/ui/linear_gradient.data"
#include "assets/inc/ui/preload.data"
#include "assets/inc/ui/images.data"
+#include "assets/inc/ui/soft_keyboard.data"
#include "assets/inc/ui/edit.data"
#include "assets/inc/ui/locale.data"
#include "assets/inc/ui/kb_int.data"
@@ -402,6 +403,7 @@ ret_t assets_init(void) {
assets_manager_add(rm, ui_linear_gradient);
assets_manager_add(rm, ui_preload);
assets_manager_add(rm, ui_images);
+ assets_manager_add(rm, ui_soft_keyboard);
assets_manager_add(rm, ui_edit);
assets_manager_add(rm, ui_locale);
assets_manager_add(rm, ui_kb_int);
diff --git a/demos/assets/inc/ui/main.data b/demos/assets/inc/ui/main.data
index 5117da8ed..bb37529c9 100644
--- a/demos/assets/inc/ui/main.data
+++ b/demos/assets/inc/ui/main.data
@@ -1,5 +1,5 @@
const unsigned char ui_main[] = {
-0x04,0x00,0x01,0x01,0x8d,0x0e,0x00,0x00,0x00,0x00,0x00,0x00,0x6d,0x61,0x69,0x6e,0x00,0x64,0x61,0x74,
+0x04,0x00,0x01,0x01,0xec,0x0e,0x00,0x00,0x00,0x00,0x00,0x00,0x6d,0x61,0x69,0x6e,0x00,0x64,0x61,0x74,
0x61,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x12,0x12,0x22,0x11,0x77,0x69,0x6e,0x64,0x6f,0x77,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
@@ -148,43 +148,48 @@ const unsigned char ui_main[] = {
0x74,0x00,0x53,0x6c,0x69,0x64,0x65,0x20,0x4d,0x65,0x6e,0x75,0x00,0x00,0x00,0x62,0x75,0x74,0x74,0x6f,
0x6e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x00,0x00,0x00,0x6e,0x61,0x6d,0x65,0x00,0x6f,0x70,0x65,0x6e,0x3a,0x76,0x67,0x63,0x61,0x6e,0x76,0x61,
-0x73,0x00,0x74,0x65,0x78,0x74,0x00,0x56,0x47,0x20,0x43,0x61,0x6e,0x76,0x61,0x73,0x00,0x00,0x00,0x62,
+0x00,0x00,0x00,0x6e,0x61,0x6d,0x65,0x00,0x6f,0x70,0x65,0x6e,0x3a,0x73,0x6f,0x66,0x74,0x5f,0x6b,0x65,
+0x79,0x62,0x6f,0x61,0x72,0x64,0x00,0x74,0x65,0x78,0x74,0x00,0x43,0x75,0x73,0x74,0x6f,0x6d,0x20,0x4b,
+0x65,0x79,0x62,0x6f,0x61,0x72,0x64,0x00,0x00,0x00,0x62,0x75,0x74,0x74,0x6f,0x6e,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x6e,0x61,
+0x6d,0x65,0x00,0x6f,0x70,0x65,0x6e,0x3a,0x76,0x67,0x63,0x61,0x6e,0x76,0x61,0x73,0x00,0x74,0x65,0x78,
+0x74,0x00,0x56,0x47,0x20,0x43,0x61,0x6e,0x76,0x61,0x73,0x00,0x00,0x00,0x62,0x75,0x74,0x74,0x6f,0x6e,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x6e,0x61,0x6d,0x65,0x00,0x6f,0x70,0x65,0x6e,0x3a,0x6c,0x69,0x6e,0x65,0x61,0x72,0x5f,0x67,
+0x72,0x61,0x64,0x69,0x65,0x6e,0x74,0x00,0x74,0x65,0x78,0x74,0x00,0x4c,0x69,0x6e,0x65,0x61,0x72,0x20,
+0x47,0x72,0x61,0x64,0x69,0x65,0x6e,0x74,0x00,0x00,0x00,0x62,0x75,0x74,0x74,0x6f,0x6e,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x6e,
+0x61,0x6d,0x65,0x00,0x6f,0x70,0x65,0x6e,0x3a,0x72,0x61,0x64,0x69,0x61,0x6c,0x5f,0x67,0x72,0x61,0x64,
+0x69,0x65,0x6e,0x74,0x00,0x74,0x65,0x78,0x74,0x00,0x52,0x61,0x64,0x69,0x61,0x6c,0x20,0x47,0x72,0x61,
+0x64,0x69,0x65,0x6e,0x74,0x00,0x00,0x00,0x62,0x75,0x74,0x74,0x6f,0x6e,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x6e,0x61,0x6d,0x65,
+0x00,0x6f,0x70,0x65,0x6e,0x3a,0x73,0x74,0x72,0x6f,0x6b,0x65,0x5f,0x67,0x72,0x61,0x64,0x69,0x65,0x6e,
+0x74,0x00,0x74,0x65,0x78,0x74,0x00,0x53,0x74,0x72,0x6f,0x6b,0x65,0x20,0x47,0x72,0x61,0x64,0x69,0x65,
+0x6e,0x74,0x00,0x00,0x00,0x00,0x76,0x69,0x65,0x77,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x64,0x00,0x00,0x00,0x64,0x00,0x00,0x00,0x73,0x65,0x6c,0x66,0x5f,0x6c,
+0x61,0x79,0x6f,0x75,0x74,0x00,0x64,0x65,0x66,0x61,0x75,0x6c,0x74,0x28,0x78,0x3d,0x30,0x2c,0x79,0x3d,
+0x30,0x2c,0x77,0x3d,0x31,0x30,0x30,0x25,0x2c,0x68,0x3d,0x31,0x30,0x30,0x25,0x29,0x00,0x63,0x68,0x69,
+0x6c,0x64,0x72,0x65,0x6e,0x5f,0x6c,0x61,0x79,0x6f,0x75,0x74,0x00,0x64,0x65,0x66,0x61,0x75,0x6c,0x74,
+0x28,0x63,0x3d,0x31,0x2c,0x72,0x3d,0x38,0x2c,0x6d,0x3d,0x35,0x2c,0x73,0x3d,0x35,0x29,0x00,0x00,0x62,
0x75,0x74,0x74,0x6f,0x6e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x6e,0x61,0x6d,0x65,0x00,0x6f,0x70,0x65,0x6e,0x3a,0x6c,0x69,0x6e,
-0x65,0x61,0x72,0x5f,0x67,0x72,0x61,0x64,0x69,0x65,0x6e,0x74,0x00,0x74,0x65,0x78,0x74,0x00,0x4c,0x69,
-0x6e,0x65,0x61,0x72,0x20,0x47,0x72,0x61,0x64,0x69,0x65,0x6e,0x74,0x00,0x00,0x00,0x62,0x75,0x74,0x74,
-0x6f,0x6e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x6e,0x61,0x6d,0x65,0x00,0x6f,0x70,0x65,0x6e,0x3a,0x6d,0x65,0x6d,
+0x74,0x65,0x73,0x74,0x00,0x74,0x65,0x78,0x74,0x00,0x4d,0x65,0x6d,0x54,0x65,0x73,0x74,0x00,0x00,0x00,
+0x62,0x75,0x74,0x74,0x6f,0x6e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x00,0x00,0x00,0x00,0x6e,0x61,0x6d,0x65,0x00,0x6f,0x70,0x65,0x6e,0x3a,0x72,0x61,0x64,0x69,0x61,0x6c,
-0x5f,0x67,0x72,0x61,0x64,0x69,0x65,0x6e,0x74,0x00,0x74,0x65,0x78,0x74,0x00,0x52,0x61,0x64,0x69,0x61,
-0x6c,0x20,0x47,0x72,0x61,0x64,0x69,0x65,0x6e,0x74,0x00,0x00,0x00,0x62,0x75,0x74,0x74,0x6f,0x6e,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x6e,0x61,0x6d,0x65,0x00,0x6f,0x70,0x65,0x6e,0x3a,0x63,0x61,
+0x6c,0x69,0x62,0x72,0x61,0x74,0x69,0x6f,0x6e,0x5f,0x77,0x69,0x6e,0x00,0x74,0x65,0x78,0x74,0x00,0x43,
+0x61,0x6c,0x69,0x62,0x72,0x61,0x74,0x69,0x6f,0x6e,0x00,0x00,0x00,0x62,0x75,0x74,0x74,0x6f,0x6e,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x00,0x6e,0x61,0x6d,0x65,0x00,0x6f,0x70,0x65,0x6e,0x3a,0x73,0x74,0x72,0x6f,0x6b,0x65,0x5f,0x67,0x72,
-0x61,0x64,0x69,0x65,0x6e,0x74,0x00,0x74,0x65,0x78,0x74,0x00,0x53,0x74,0x72,0x6f,0x6b,0x65,0x20,0x47,
-0x72,0x61,0x64,0x69,0x65,0x6e,0x74,0x00,0x00,0x00,0x00,0x76,0x69,0x65,0x77,0x00,0x00,0x00,0x00,0x00,
+0x00,0x6e,0x61,0x6d,0x65,0x00,0x73,0x68,0x6f,0x77,0x5f,0x66,0x70,0x73,0x00,0x74,0x65,0x78,0x74,0x00,
+0x53,0x68,0x6f,0x77,0x20,0x46,0x50,0x53,0x00,0x00,0x00,0x62,0x75,0x74,0x74,0x6f,0x6e,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x64,0x00,0x00,0x00,0x64,0x00,0x00,0x00,0x73,
-0x65,0x6c,0x66,0x5f,0x6c,0x61,0x79,0x6f,0x75,0x74,0x00,0x64,0x65,0x66,0x61,0x75,0x6c,0x74,0x28,0x78,
-0x3d,0x30,0x2c,0x79,0x3d,0x30,0x2c,0x77,0x3d,0x31,0x30,0x30,0x25,0x2c,0x68,0x3d,0x31,0x30,0x30,0x25,
-0x29,0x00,0x63,0x68,0x69,0x6c,0x64,0x72,0x65,0x6e,0x5f,0x6c,0x61,0x79,0x6f,0x75,0x74,0x00,0x64,0x65,
-0x66,0x61,0x75,0x6c,0x74,0x28,0x63,0x3d,0x31,0x2c,0x72,0x3d,0x38,0x2c,0x6d,0x3d,0x35,0x2c,0x73,0x3d,
-0x35,0x29,0x00,0x00,0x62,0x75,0x74,0x74,0x6f,0x6e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x6e,0x61,0x6d,0x65,0x00,0x6f,0x70,0x65,
-0x6e,0x3a,0x6d,0x65,0x6d,0x74,0x65,0x73,0x74,0x00,0x74,0x65,0x78,0x74,0x00,0x4d,0x65,0x6d,0x54,0x65,
-0x73,0x74,0x00,0x00,0x00,0x62,0x75,0x74,0x74,0x6f,0x6e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x6e,0x61,0x6d,0x65,0x00,0x6f,0x70,
-0x65,0x6e,0x3a,0x63,0x61,0x6c,0x69,0x62,0x72,0x61,0x74,0x69,0x6f,0x6e,0x5f,0x77,0x69,0x6e,0x00,0x74,
-0x65,0x78,0x74,0x00,0x43,0x61,0x6c,0x69,0x62,0x72,0x61,0x74,0x69,0x6f,0x6e,0x00,0x00,0x00,0x62,0x75,
-0x74,0x74,0x6f,0x6e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x00,0x00,0x00,0x00,0x00,0x00,0x6e,0x61,0x6d,0x65,0x00,0x73,0x68,0x6f,0x77,0x5f,0x66,0x70,0x73,0x00,
-0x74,0x65,0x78,0x74,0x00,0x53,0x68,0x6f,0x77,0x20,0x46,0x50,0x53,0x00,0x00,0x00,0x62,0x75,0x74,0x74,
-0x6f,0x6e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x00,0x00,0x00,0x00,0x6e,0x61,0x6d,0x65,0x00,0x65,0x78,0x69,0x74,0x00,0x74,0x65,0x78,0x74,0x00,0x45,
-0x78,0x69,0x74,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,};/*3773*/
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x6e,
+0x61,0x6d,0x65,0x00,0x65,0x78,0x69,0x74,0x00,0x74,0x65,0x78,0x74,0x00,0x45,0x78,0x69,0x74,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,};/*3868*/
diff --git a/demos/assets/inc/ui/soft_keyboard.data b/demos/assets/inc/ui/soft_keyboard.data
new file mode 100644
index 000000000..84e118aed
--- /dev/null
+++ b/demos/assets/inc/ui/soft_keyboard.data
@@ -0,0 +1,63 @@
+const unsigned char ui_soft_keyboard[] = {
+0x04,0x00,0x01,0x01,0x98,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x73,0x6f,0x66,0x74,0x5f,0x6b,0x65,0x79,
+0x62,0x6f,0x61,0x72,0x64,0x00,0x64,0x61,0x74,0x61,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x12,0x12,0x22,0x11,0x77,0x69,0x6e,0x64,0x6f,0x77,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x74,0x65,0x78,0x74,
+0x00,0x43,0x75,0x73,0x74,0x6f,0x6d,0x20,0x53,0x6f,0x66,0x74,0x20,0x4b,0x65,0x79,0x62,0x6f,0x61,0x72,
+0x64,0x00,0x61,0x6e,0x69,0x6d,0x5f,0x68,0x69,0x6e,0x74,0x00,0x68,0x74,0x72,0x61,0x6e,0x73,0x6c,0x61,
+0x74,0x65,0x00,0x00,0x65,0x64,0x69,0x74,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x0a,0x00,0x00,0x00,0x5a,0x00,0x00,0x00,0x1e,0x00,0x00,0x00,0x73,0x65,0x6c,0x66,0x5f,0x6c,0x61,0x79,
+0x6f,0x75,0x74,0x00,0x64,0x65,0x66,0x61,0x75,0x6c,0x74,0x28,0x78,0x3d,0x63,0x2c,0x79,0x3d,0x31,0x30,
+0x2c,0x77,0x3d,0x39,0x30,0x25,0x2c,0x68,0x3d,0x33,0x30,0x29,0x00,0x69,0x6e,0x70,0x75,0x74,0x5f,0x74,
+0x79,0x70,0x65,0x00,0x63,0x75,0x73,0x74,0x6f,0x6d,0x00,0x66,0x6f,0x63,0x75,0x73,0x00,0x74,0x72,0x75,
+0x65,0x00,0x74,0x65,0x78,0x74,0x00,0x00,0x00,0x00,0x76,0x69,0x65,0x77,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x3c,0x00,0x00,0x00,0x5a,0x00,0x00,0x00,0xc4,0xff,0xff,0xff,0x73,0x65,
+0x6c,0x66,0x5f,0x6c,0x61,0x79,0x6f,0x75,0x74,0x00,0x64,0x65,0x66,0x61,0x75,0x6c,0x74,0x28,0x78,0x3d,
+0x63,0x2c,0x79,0x3d,0x36,0x30,0x2c,0x77,0x3d,0x39,0x30,0x25,0x2c,0x68,0x3d,0x2d,0x36,0x30,0x29,0x00,
+0x69,0x73,0x5f,0x6b,0x65,0x79,0x62,0x6f,0x61,0x72,0x64,0x00,0x74,0x72,0x75,0x65,0x00,0x63,0x68,0x69,
+0x6c,0x64,0x72,0x65,0x6e,0x5f,0x6c,0x61,0x79,0x6f,0x75,0x74,0x00,0x64,0x65,0x66,0x61,0x75,0x6c,0x74,
+0x28,0x72,0x3d,0x34,0x2c,0x63,0x3d,0x34,0x2c,0x6d,0x3d,0x35,0x2c,0x73,0x3d,0x35,0x29,0x00,0x00,0x62,
+0x75,0x74,0x74,0x6f,0x6e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x6e,0x61,0x6d,0x65,0x00,0x6b,0x65,0x79,0x00,0x74,0x65,0x78,0x74,
+0x00,0x30,0x00,0x00,0x00,0x62,0x75,0x74,0x74,0x6f,0x6e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x6e,0x61,0x6d,0x65,0x00,0x6b,0x65,
+0x79,0x00,0x74,0x65,0x78,0x74,0x00,0x31,0x00,0x00,0x00,0x62,0x75,0x74,0x74,0x6f,0x6e,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x6e,
+0x61,0x6d,0x65,0x00,0x6b,0x65,0x79,0x00,0x74,0x65,0x78,0x74,0x00,0x32,0x00,0x00,0x00,0x62,0x75,0x74,
+0x74,0x6f,0x6e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x6e,0x61,0x6d,0x65,0x00,0x6b,0x65,0x79,0x00,0x74,0x65,0x78,0x74,0x00,0x33,
+0x00,0x00,0x00,0x62,0x75,0x74,0x74,0x6f,0x6e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x6e,0x61,0x6d,0x65,0x00,0x6b,0x65,0x79,0x00,
+0x74,0x65,0x78,0x74,0x00,0x34,0x00,0x00,0x00,0x62,0x75,0x74,0x74,0x6f,0x6e,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x6e,0x61,0x6d,
+0x65,0x00,0x6b,0x65,0x79,0x00,0x74,0x65,0x78,0x74,0x00,0x35,0x00,0x00,0x00,0x62,0x75,0x74,0x74,0x6f,
+0x6e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x6e,0x61,0x6d,0x65,0x00,0x6b,0x65,0x79,0x00,0x74,0x65,0x78,0x74,0x00,0x36,0x00,0x00,
+0x00,0x62,0x75,0x74,0x74,0x6f,0x6e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x6e,0x61,0x6d,0x65,0x00,0x6b,0x65,0x79,0x00,0x74,0x65,
+0x78,0x74,0x00,0x37,0x00,0x00,0x00,0x62,0x75,0x74,0x74,0x6f,0x6e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x6e,0x61,0x6d,0x65,0x00,
+0x6b,0x65,0x79,0x00,0x74,0x65,0x78,0x74,0x00,0x38,0x00,0x00,0x00,0x62,0x75,0x74,0x74,0x6f,0x6e,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x6e,0x61,0x6d,0x65,0x00,0x6b,0x65,0x79,0x00,0x74,0x65,0x78,0x74,0x00,0x39,0x00,0x00,0x00,0x62,
+0x75,0x74,0x74,0x6f,0x6e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x6e,0x61,0x6d,0x65,0x00,0x6b,0x65,0x79,0x00,0x74,0x65,0x78,0x74,
+0x00,0x23,0x00,0x00,0x00,0x62,0x75,0x74,0x74,0x6f,0x6e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x6e,0x61,0x6d,0x65,0x00,0x62,0x61,
+0x63,0x6b,0x73,0x70,0x61,0x63,0x65,0x00,0x74,0x65,0x78,0x74,0x00,0x3c,0x3d,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,};/*1224*/
diff --git a/demos/assets/raw/ui/main.bin b/demos/assets/raw/ui/main.bin
index 16d41c942..d614f4ed1 100644
Binary files a/demos/assets/raw/ui/main.bin and b/demos/assets/raw/ui/main.bin differ
diff --git a/demos/assets/raw/ui/main.xml b/demos/assets/raw/ui/main.xml
index 6794b3112..4ead4d931 100644
--- a/demos/assets/raw/ui/main.xml
+++ b/demos/assets/raw/ui/main.xml
@@ -34,6 +34,7 @@
+
diff --git a/demos/assets/raw/ui/soft_keyboard.bin b/demos/assets/raw/ui/soft_keyboard.bin
new file mode 100644
index 000000000..765af45bd
Binary files /dev/null and b/demos/assets/raw/ui/soft_keyboard.bin differ
diff --git a/demos/assets/raw/ui/soft_keyboard.xml b/demos/assets/raw/ui/soft_keyboard.xml
new file mode 100644
index 000000000..37b063ed9
--- /dev/null
+++ b/demos/assets/raw/ui/soft_keyboard.xml
@@ -0,0 +1,20 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/demos/demo_ui_app.c b/demos/demo_ui_app.c
index 4041ba9d9..798f16237 100644
--- a/demos/demo_ui_app.c
+++ b/demos/demo_ui_app.c
@@ -272,13 +272,30 @@ static ret_t on_open_window(void* ctx, event_t* e) {
}
static ret_t on_close(void* ctx, event_t* e) {
- widget_t* win = (widget_t*)ctx;
+ widget_t* win = WIDGET(ctx);
(void)e;
return window_close(win);
}
+static ret_t on_send_key(void* ctx, event_t* e) {
+ widget_t* button = WIDGET(e->target);
+ char text[2];
+ text[0] = (char)button->text.str[0];
+ text[1] = '\0';
+
+ input_method_commit_text(input_method(), text);
+
+ return RET_OK;
+}
+
+static ret_t on_backspace(void* ctx, event_t* e) {
+ input_method_dispatch_key(input_method(), TK_KEY_BACKSPACE);
+
+ return RET_OK;
+}
+
static ret_t on_quit(void* ctx, event_t* e) {
- widget_t* dialog = (widget_t*)ctx;
+ widget_t* dialog = WIDGET(ctx);
dialog_quit(dialog, 0);
(void)e;
@@ -461,6 +478,10 @@ static ret_t install_one(void* ctx, const void* iter) {
if (win) {
widget_on(widget, EVT_CLICK, on_close, win);
}
+ } else if (tk_str_eq(name, "key")) {
+ widget_on(widget, EVT_CLICK, on_send_key, NULL);
+ } else if (tk_str_eq(name, "backspace")) {
+ widget_on(widget, EVT_CLICK, on_backspace, NULL);
} else if (tk_str_eq(name, "quit")) {
widget_t* win = widget_get_window(widget);
if (win) {
diff --git a/tools/idl_gen/idl.json b/tools/idl_gen/idl.json
index a666a0577..0ba0e9e27 100644
--- a/tools/idl_gen/idl.json
+++ b/tools/idl_gen/idl.json
@@ -9512,6 +9512,14 @@
{
"desc": " 延迟时间(毫秒)\n\n",
"name": "WIDGET_PROP_DELAY"
+ },
+ {
+ "desc": " 是否为键盘。\n\n",
+ "name": "WIDGET_PROP_IS_KEYBOARD"
+ },
+ {
+ "desc": " 设置为输入焦点。\n\n",
+ "name": "WIDGET_PROP_FOCUS"
}
],
"header": "base/widget_consts.h",
@@ -11847,6 +11855,24 @@
"desc": "返回RET_OK表示成功,否则表示失败。"
}
},
+ {
+ "params": [
+ {
+ "type": "widget_t*",
+ "name": "widget",
+ "desc": "控件对象。"
+ }
+ ],
+ "annotation": {
+ "private": true
+ },
+ "desc": " 判断当前控件是否是keyboard。\n\n> keyboard收到pointer事件时,不会让当前控件失去焦点。\n\n 在自定义软键盘时,将所有按钮放到一个容器当中,并设置为is_keyboard。\n\n ```c\n widget_set_prop_bool(group, WIDGET_PROP_IS_KEYBOARD, TRUE);\n ```\n\n\n\n",
+ "name": "widget_is_keyboard",
+ "return": {
+ "type": "ret_t",
+ "desc": "返回RET_OK表示成功,否则表示失败。"
+ }
+ },
{
"params": [
{
@@ -12753,6 +12779,14 @@
"readable": true
}
},
+ {
+ "name": "initializing",
+ "desc": " 标识控件正在初始化。\n\n",
+ "type": "bool_t",
+ "annotation": {
+ "readable": true
+ }
+ },
{
"name": "destroying",
"desc": " 标识控件正在被销毁。\n\n",
@@ -14461,7 +14495,7 @@
}
},
{
- "name": "day",
+ "name": "wday",
"desc": " 星期几(0-6, Sunday = 0)。\n\n",
"type": "int32_t",
"annotation": {
@@ -23112,12 +23146,9 @@
"events": [],
"properties": [],
"header": "base/style_const.h",
- "desc": "\n 只读的style,从theme\\_t中获取数据。\n\n tools/theme_gen用于把XML的主题数据转换成常量数据。\n\n\n\n",
+ "desc": "\n 只读的style,从theme\\_t中获取数据。\n\n tools/theme_gen用于把XML的主题数据转换成常量数据。\n\n\n",
"name": "style_const_t",
"parent": "style_t",
- "annotation": {
- "fake": true
- },
"level": 2
},
{
@@ -23554,7 +23585,7 @@
"annotation": {
"private": true
},
- "desc": " 强制立即关闭窗口。\r\n\r\n> 本函数不会执行窗口动画。 \r\n\r\n",
+ "desc": " 强制立即关闭窗口。\r\n\r\n> 本函数不会执行窗口动画。\r\n\r\n",
"name": "window_manager_close_window_force",
"return": {
"type": "ret_t",
@@ -23868,6 +23899,78 @@
"desc": "返回object对象。"
}
},
+ {
+ "params": [
+ {
+ "type": "object_t*",
+ "name": "obj",
+ "desc": "object对象。"
+ }
+ ],
+ "annotation": {
+ "scriptable": true
+ },
+ "desc": " 获取对象的类型名称。\n\n\n\n",
+ "name": "object_get_type",
+ "return": {
+ "type": "const char*",
+ "desc": "返回对象的类型名称。"
+ }
+ },
+ {
+ "params": [
+ {
+ "type": "object_t*",
+ "name": "obj",
+ "desc": "object对象。"
+ }
+ ],
+ "annotation": {
+ "scriptable": true
+ },
+ "desc": " 获取对象的描述信息。\n\n\n\n",
+ "name": "object_get_desc",
+ "return": {
+ "type": "const char*",
+ "desc": "返回对象的描述信息。"
+ }
+ },
+ {
+ "params": [
+ {
+ "type": "object_t*",
+ "name": "obj",
+ "desc": "object对象。"
+ }
+ ],
+ "annotation": {
+ "scriptable": true
+ },
+ "desc": " 获取对象占用内存的大小。\n\n\n\n",
+ "name": "object_get_size",
+ "return": {
+ "type": "uint32_t",
+ "desc": "返回对象占用内存的大小。"
+ }
+ },
+ {
+ "params": [
+ {
+ "type": "object_t*",
+ "name": "obj",
+ "desc": "object对象。"
+ }
+ ],
+ "annotation": {
+ "scriptable": true
+ },
+ "desc": " 判断对象是否是集合。\n\n\n\n",
+ "name": "object_is_collection",
+ "return": {
+ "type": "bool_t",
+ "desc": "返回TRUE表示是集合,否则不是。"
+ }
+ },
{
"params": [
{
@@ -29136,6 +29239,29 @@
"type": "ret_t",
"desc": "返回RET_OK表示成功,否则表示失败。"
}
+ },
+ {
+ "params": [
+ {
+ "type": "widget_t*",
+ "name": "widget",
+ "desc": "widget对象。"
+ },
+ {
+ "type": "bool_t",
+ "name": "focus",
+ "desc": "是否为焦点。。"
+ }
+ ],
+ "annotation": {
+ "scriptable": true
+ },
+ "desc": " 设置为焦点。\r\n\r\n",
+ "name": "edit_set_focus",
+ "return": {
+ "type": "ret_t",
+ "desc": "返回RET_OK表示成功,否则表示失败。"
+ }
}
],
"events": [
@@ -29255,6 +29381,19 @@
"scriptable": true
}
},
+ {
+ "name": "focus",
+ "desc": " 设置为焦点(通常用于在XML中缺省设置为焦点控件)。\r\n",
+ "type": "char*",
+ "annotation": {
+ "set_prop": true,
+ "get_prop": true,
+ "readable": true,
+ "persitent": true,
+ "design": true,
+ "scriptable": true
+ }
+ },
{
"name": "input_type",
"desc": " 输入类型。\r\n XXX:需要在min/max/step之前设置。\r\n",
@@ -30305,6 +30444,24 @@
"desc": "返回object对象。"
}
},
+ {
+ "params": [
+ {
+ "type": "object_default_t*",
+ "name": "o",
+ "desc": "被克隆的对象。"
+ }
+ ],
+ "annotation": {
+ "constructor": true
+ },
+ "desc": "\n 克隆对象。\n\n\n\n\n",
+ "name": "object_default_create",
+ "return": {
+ "type": "object_t*",
+ "desc": "返回object对象。"
+ }
+ },
{
"params": [
{