Set location and size of numpad keyboard

Description

I made multiple tabs and inside each tab page, I put several textareas on the left side. When I click on the text area, I get a numpad keyboard. The problem is that when the textarea is at the bottom, the keyboard is appearing on the bottom half of the screen and covering it. Is there an easy way to make the keyboard appear on just the right half of the screen? Is there an easy way to make a container and have the keyboard occupy the full container (i.e. not just the bottom half of the container)

I saw in the widgets demo where the screen scrolls up. I did my best to disable the scrolling actions because my SPI driver is accessing the screen too slowly to make scrolling comfortable.

What MCU/Processor/Board and compiler are you using?

Atmel ARM32, arm-none-eabi-gcc.exe

What LVGL version are you using?

v7.7.2

What do you want to achieve?

Set location and size of keyboard

What have you tried so far?

Code to reproduce

The code block(s) should be formatted like:

static void ta_event_cb(lv_obj_t* ta, lv_event_t e)
{
	chosenTextArea = ta;
	if (e == LV_EVENT_RELEASED) {
		if (kb == NULL) {
			kb = lv_keyboard_create(lv_scr_act(), NULL);
			lv_keyboard_set_mode(kb, LV_KEYBOARD_MODE_NUM);
			lv_obj_set_event_cb(kb, kb_event_cb);
			lv_indev_wait_release(lv_indev_get_act());
		}
		lv_textarea_set_cursor_hidden(ta, false);
		lv_keyboard_set_textarea(kb, ta);
	}
	else if (e == LV_EVENT_DEFOCUSED) {
		lv_textarea_set_cursor_hidden(ta, true);
	}
}

You can create a new cont in the area where you want the keyboard to be displayed, and then create a new keyboard on that cont
shuch as

lv_obj_t *kb_cont = lv_cont_create(lv_scr_act(),NULL);
lv_obj_set_pos(kb_cont ,x,y);
lv_obj_t *kb = lv_keyboard_create(kb_cont, NULL);
2 Likes