From: Akilan Purushothaman <akilan.purushothaman@gmail.com>
To: qemu-devel@nongnu.org
Subject: Help with qemu_input_event_send_key_number and IOThreads in Qemu
Date: Tue, 20 Feb 2024 20:24:36 -0800 [thread overview]
Message-ID: <CAMQL4mtzZr5Fg_iSWY3S5eRRrM9u6ya5itssXb+q0FaaWW4FXA@mail.gmail.com> (raw)
[-- 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 --]
reply other threads:[~2024-02-21 15:49 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAMQL4mtzZr5Fg_iSWY3S5eRRrM9u6ya5itssXb+q0FaaWW4FXA@mail.gmail.com \
--to=akilan.purushothaman@gmail.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).