Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Keyboard not working in pc simulator #34

Open
jiabuda opened this issue Feb 11, 2023 · 6 comments
Open

Keyboard not working in pc simulator #34

jiabuda opened this issue Feb 11, 2023 · 6 comments

Comments

@jiabuda
Copy link

jiabuda commented Feb 11, 2023

Hi, I try to run the simulator on PC, i use codeblocks-20.03mingw-setup.exe this file to install codeblock, yet after i clone this project and run it. I found that the keyboard not working on the demo, but I can use mouse to click and drag the widgets. But it does not response to any key pressed on my keyboard.

And I try to install the same version codeblocks on another pc, the same problem.

So is this simulator not support keyboard or some other problem? I watch some learning video on youtube, on the simulator inside the video, the keyboard works. And also I try the visual studio version simulator, keyboard works. So just problem on codeblocks?

@chanvenjoe
Copy link

chanvenjoe commented Feb 11, 2023 via email

@stale
Copy link

stale bot commented Apr 20, 2023

This issue or pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale This will not be worked on label Apr 20, 2023
@WiseMCU
Copy link

WiseMCU commented May 21, 2023

Mail have been received, thank you.

Hello, I have also encountered the same issue. Have you resolved it?

@stale stale bot removed the stale This will not be worked on label May 21, 2023
@jiabuda
Copy link
Author

jiabuda commented Aug 23, 2023

@WiseMCU 没解决,项目用vs搞定了

@100ask
Copy link
Collaborator

100ask commented Apr 5, 2024

#include "lv_drivers/win32drv/win32drv.h"
.....
{
    lv_group_t * g = lv_group_create();
    lv_indev_set_group(lv_win32_keypad_device_object, g);  // keyboard
    lv_indev_set_group(lv_win32_encoder_device_object, g);  // Mouse wheel (Simulate encoder effect)
}

@jd3096-mpy
Copy link

jd3096-mpy commented May 20, 2024

#include "lv_drivers/win32drv/win32drv.h"
.....
{
    lv_group_t * g = lv_group_create();
    lv_indev_set_group(lv_win32_keypad_device_object, g);  // keyboard
    lv_indev_set_group(lv_win32_encoder_device_object, g);  // Mouse wheel (Simulate encoder effect)
}

Thanks,it works in codeblocks

here is a simple example:

#include "my_gui.h"
#include "lvgl.h"
#include "lv_drivers/win32drv/win32drv.h"


static void lv_example_textarea(void)
{
    lv_group_t * g = lv_group_create();
    lv_group_set_default(g);
    lv_indev_set_group(lv_win32_keypad_device_object, g);

    lv_obj_t *textarea_name = lv_textarea_create(lv_scr_act());
    lv_obj_set_width(textarea_name, 400);
    lv_obj_set_style_text_font(textarea_name, &lv_font_montserrat_30, LV_PART_MAIN);
    lv_obj_align(textarea_name, LV_ALIGN_CENTER, 0, 0 );

}

void my_gui(void)
{
    lv_example_textarea();
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants