On Wed, Aug 1, 2018 at 11:27 AM, R0b0t1 <r03...@gmail.com> wrote: > On Wed, Aug 1, 2018 at 2:27 AM, Armin Novak <armin.no...@thincast.com> wrote: >> Glad it works, >> >> as for scancodes you have to figure out what type of code you get >> (libinput? X11?) and map that accordingly. >> > > I'm using SDL2. I can't exactly tell what it corresponds to but I also > need to know what the keys sent by FreeRDP correspond to. From memory > the definitions in freerdp/scancode.h are the Microsoft virtual key > constants. However I can't reliably translate keys to/from those > numbers using what should be the appropriate system functions. > > E.g. this escape gives SDL2 scancode 8, SDL2 symbolic 101, > MapVirtualKeyW w/ MAPVK_VSC_TO_VK_EX 55 > > I realize this is kind of open ended but hopefully you have some kind of > guess. >
This was fixed by translating the SDL2 scancodes to the Direct Input scancodes. > > I also have an issue where any call to freerdp_input_send_mouse_event > terminates the connection on the server side. Is this normal for > invalid input? What consideration do the values passed need? > I was not setting the mouse flags value properly. Am I right in my reading that there is no mouse button up event? >> Preferred way would be to use freerdp_input_send_keyboard_event and >> freerdp_input_send_keyboard_event_ex >> >> which are wrappers around direct function pointer access with proper >> checks already done. >> > > Will do. > >> >> There is also freerdp_input_send_unicode_keyboard_event which can send >> UTF-16 symbols >> >> (but that might not be what you want and some servers do not allow key >> combinations this way) >> > > Well, SDL2 does actually have UTF IME support. This works as expected > but the support in SDL2 is more complete than in FreeRDP - SDL2 > returns an arbitrary UTF-8 string, which I need to take the first two > bytes of to create a UINT16 for FreeRDP. > > > Cheers, > R0b0t1 > > > >> >> On 08/01/2018 08:04 AM, R0b0t1 wrote: >>> On Tue, Jul 31, 2018 at 2:18 AM, Armin Novak via FreeRDP-devel >>> <freerdp-devel@lists.sourceforge.net> wrote: >>>>> Thanks. I did and am mostly on the right track. If you wouldn't mind >>>>> could you look over the code I have? The painting callbacks are never >>>>> called. Though as far as I can tell I implemented everything I should >>>>> have (probably even some things I didn't need to). >>>> You're missing the RDP main loop (the one with freerdp_connect and >>>> freerdp_disconnect) >>> This was it. I was having a hard time figuring out which function >>> actually called into the main loop of FreeRDP. It turns out it is >>> freerdp_check_event_handles. >>> >>>>> Not exactly sure how to send you the code. Hopefully the list accepts >>>>> .tar.xz? There are two files. >>>> Best a link to a git branch ;) >>>> >>> Thanks for the help so far. I am displaying the screen using hardware >>> acceleration and receive decent throughput. I have started in on the >>> input handling. >>> >>> I can send keys, but what SDL2 reports as a scancode does not seem to >>> match what Windows expects or FreeRDP sends. I would prefer to use >>> freerdp_input_send_keyboard_event_ex so that I can handle >>> keyup/keydown properly but do not know how RDP scancodes are mapped. >>> However even if I use freerdp_input_send_keyboard the keys are still >>> not right but in the same way as far as I can tell. >>> >>> The Android example does something else and calls >>> instance->input->KeyboardEvent. Is any one more correct? >>> >>> Why are there both freerdp_input_send_keyboard_event_ex and >>> freerdp_input_send_extended_mouse_event? >>> >>> Cheers, >>> R0b0t1 >> ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ FreeRDP-devel mailing list FreeRDP-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freerdp-devel