qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* Help with qemu_input_event_send_key_number and IOThreads in Qemu
@ 2024-02-21  4:24 Akilan Purushothaman
  0 siblings, 0 replies; only message in thread
From: Akilan Purushothaman @ 2024-02-21  4:24 UTC (permalink / raw)
  To: qemu-devel

[-- Attachment #1: Type: text/plain, Size: 1093 bytes --]

Dear Development Team,

I'm trying to use Qemu as a shared library for my Android app. It is
working fine so far. I can get the display output, but I cannot send it any
keys. When I try, I get an error about an assert() failing at line 91 in
tcg-accel-ops.c
<https://github.com/qemu/qemu/blob/da96ad4a6a2ef26c83b15fa95e7fceef5147269c/accel/tcg/tcg-accel-ops.c#L91>.
I think I'm supposed to run it from some IOThread, but I am not sure how it
is done. I would appreciate it very much if you helped me with this.

void snd_keypress(const char *ke, int len){
>     int id = index_from_key(ke, len);
>     printf("yop\n");
>     if(l.kbd != NULL && l.dcl.con != NULL) {
>         printf("convert%d\n", id);
>         printf("start event\n");
>         qemu_input_event_send_key_number(l.dcl.con, id, true);
>         qemu_input_event_send_key_delay(0);
>         printf("started\n");
>         sleep(1);
>         printf("end event\n");
>        qemu_input_event_send_key_number(l.dcl.con, id, false);
>        qemu_input_event_send_key_delay(0);
>     }
> }
>

Best regards,
Akilan Purushothaman

[-- Attachment #2: Type: text/html, Size: 1460 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-02-21 15:49 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-21  4:24 Help with qemu_input_event_send_key_number and IOThreads in Qemu Akilan Purushothaman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).