Re: XTestFakeKeyEvent GDK-equivalent



On Thu, 5 Jul 2018, Anarchean via gtk-list wrote:

I'm working into implementing a virtual remote keyboard/touch pad daemon for Linux, currently I'm dumping events into an uinput device, but that is giving me some trouble with my keyboard layout (which is brazillian, br-abnt2). I was looking for a way to this in X, found XTestFakeKeyEvent and was wondering if I could make it simpler and cross-platform using GDK3. I tried this attached code, but it doesn't do anything. I was wondering if someone has done this before and know what I'm doing wrong or if I should just give up doing with GDK.

The context is a little different, but the attached function works, given a pointers to an existing GtkWidget and GdkEvent.

Also, this is an extra, if I can't just fake key events, what should I use to map unicode chars into linux/input.h event key codes based on my keyboard layout on X? What about Wayland?

man xmodmap ?

--
Allin Cottrell
Department of Economics
Wake Forest University

Attachment: manufacture.c
Description: Text document



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]